Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Remove the 'cred' argument from bread(). Remove a now unused...
details: https://anonhg.NetBSD.org/src/rev/0d4c28a8fe27
branches: trunk
changeset: 336974:0d4c28a8fe27
user: maxv <maxv%NetBSD.org@localhost>
date: Sat Mar 28 19:24:04 2015 +0000
description:
Remove the 'cred' argument from bread(). Remove a now unused var in
ffs_snapshot.c. Update the man page accordingly.
ok hannken@
diffstat:
share/man/man9/buffercache.9 | 10 ++++------
sys/fs/adosfs/advfsops.c | 16 ++++++++--------
sys/fs/adosfs/advnops.c | 8 ++++----
sys/fs/cd9660/cd9660_lookup.c | 6 +++---
sys/fs/cd9660/cd9660_rrip.c | 6 +++---
sys/fs/cd9660/cd9660_vfsops.c | 10 +++++-----
sys/fs/cd9660/cd9660_vnops.c | 8 ++++----
sys/fs/efs/efs_subr.c | 6 +++---
sys/fs/filecorefs/filecore_bmap.c | 10 +++++-----
sys/fs/filecorefs/filecore_vfsops.c | 8 ++++----
sys/fs/filecorefs/filecore_vnops.c | 6 +++---
sys/fs/hfs/hfs_subr.c | 6 +++---
sys/fs/msdosfs/msdosfs_denode.c | 6 +++---
sys/fs/msdosfs/msdosfs_fat.c | 16 ++++++++--------
sys/fs/msdosfs/msdosfs_lookup.c | 26 +++++++++++++-------------
sys/fs/msdosfs/msdosfs_vfsops.c | 8 ++++----
sys/fs/msdosfs/msdosfs_vnops.c | 10 +++++-----
sys/fs/nilfs/nilfs_subr.c | 8 ++++----
sys/fs/nilfs/nilfs_vfsops.c | 14 +++++++-------
sys/fs/ntfs/ntfs_subr.c | 10 +++++-----
sys/fs/ntfs/ntfs_vfsops.c | 6 +++---
sys/fs/sysvbfs/bfs_sysvbfs.c | 6 +++---
sys/fs/v7fs/v7fs_io_kern.c | 8 ++++----
sys/kern/vfs_bio.c | 7 +++----
sys/miscfs/specfs/spec_vnops.c | 9 ++++-----
sys/sys/buf.h | 4 ++--
sys/ufs/chfs/chfs_vnops.c | 4 ++--
sys/ufs/ext2fs/ext2fs_alloc.c | 12 ++++++------
sys/ufs/ext2fs/ext2fs_balloc.c | 12 ++++++------
sys/ufs/ext2fs/ext2fs_inode.c | 6 +++---
sys/ufs/ext2fs/ext2fs_readwrite.c | 6 +++---
sys/ufs/ext2fs/ext2fs_subr.c | 6 +++---
sys/ufs/ext2fs/ext2fs_vfsops.c | 16 ++++++++--------
sys/ufs/ffs/ffs_alloc.c | 24 ++++++++++++------------
sys/ufs/ffs/ffs_balloc.c | 28 ++++++++++++++--------------
sys/ufs/ffs/ffs_inode.c | 6 +++---
sys/ufs/ffs/ffs_snapshot.c | 19 +++++++++----------
sys/ufs/ffs/ffs_vfsops.c | 22 +++++++++++-----------
sys/ufs/ffs/ffs_wapbl.c | 6 +++---
sys/ufs/lfs/lfs.h | 8 ++++----
sys/ufs/lfs/lfs_balloc.c | 10 +++++-----
sys/ufs/lfs/lfs_rfw.c | 12 ++++++------
sys/ufs/lfs/lfs_segment.c | 8 ++++----
sys/ufs/lfs/lfs_syscalls.c | 6 +++---
sys/ufs/lfs/lfs_vfsops.c | 20 ++++++++++----------
sys/ufs/lfs/ulfs_quota2.c | 13 +++++--------
sys/ufs/lfs/ulfs_readwrite.c | 6 +++---
sys/ufs/ufs/ufs_quota2.c | 11 +++++------
sys/ufs/ufs/ufs_readwrite.c | 6 +++---
49 files changed, 248 insertions(+), 257 deletions(-)
diffs (truncated from 2242 to 300 lines):
diff -r adcb329ada25 -r 0d4c28a8fe27 share/man/man9/buffercache.9
--- a/share/man/man9/buffercache.9 Sat Mar 28 17:45:47 2015 +0000
+++ b/share/man/man9/buffercache.9 Sat Mar 28 19:24:04 2015 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: buffercache.9,v 1.26 2015/03/28 17:23:42 maxv Exp $
+.\" $NetBSD: buffercache.9,v 1.27 2015/03/28 19:24:04 maxv Exp $
.\"
.\" Copyright (c)2003 YAMAMOTO Takashi,
.\" All rights reserved.
@@ -124,7 +124,7 @@
.In sys/buf.h
.Ft int
.Fn bread "struct vnode *vp" "daddr_t blkno" "int size" \
-"struct kauth_cred *cred" "int flags" "buf_t **bpp"
+"int flags" "buf_t **bpp"
.Ft int
.Fn breadn "struct vnode *vp" "daddr_t blkno" "int size" \
"daddr_t rablks[]" "int rasizes[]" "int nrablks" \
@@ -169,7 +169,7 @@
.\" ------------------------------------------------------------
.Sh FUNCTIONS
.Bl -tag -width compact
-.It Fn bread "vp" "blkno" "size" "cred" "flags" "bpp"
+.It Fn bread "vp" "blkno" "size" "flags" "bpp"
Read a block corresponding to
.Fa vp
and
@@ -201,9 +201,7 @@
.Fn bread
allocates a buffer with enough pages for
.Fa size
-and reads the specified disk block into it using
-credential
-.Fa cred .
+and reads the specified disk block into it.
.Pp
The buffer returned by
.Fn bread
diff -r adcb329ada25 -r 0d4c28a8fe27 sys/fs/adosfs/advfsops.c
--- a/sys/fs/adosfs/advfsops.c Sat Mar 28 17:45:47 2015 +0000
+++ b/sys/fs/adosfs/advfsops.c Sat Mar 28 19:24:04 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: advfsops.c,v 1.72 2015/01/02 19:42:07 christos Exp $ */
+/* $NetBSD: advfsops.c,v 1.73 2015/03/28 19:24:05 maxv Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: advfsops.c,v 1.72 2015/01/02 19:42:07 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: advfsops.c,v 1.73 2015/03/28 19:24:05 maxv Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_netbsd.h"
@@ -232,7 +232,7 @@
/* The filesytem variant ('dostype') is stored in the boot block */
bp = NULL;
if ((error = bread(devvp, (daddr_t)BBOFF,
- amp->bsize, NOCRED, 0, &bp)) != 0) {
+ amp->bsize, 0, &bp)) != 0) {
goto fail;
}
amp->dostype = adoswordn(bp, 0);
@@ -403,7 +403,7 @@
amp = VFSTOADOSFS(mp);
if ((error = bread(amp->devvp, an * amp->bsize / DEV_BSIZE,
- amp->bsize, NOCRED, 0, &bp)) != 0)
+ amp->bsize, 0, &bp)) != 0)
return error;
ap = pool_get(&adosfs_node_pool, PR_WAITOK);
@@ -525,7 +525,7 @@
brelse(bp, 0);
bp = NULL;
error = bread(amp->devvp, ap->linkto * amp->bsize / DEV_BSIZE,
- amp->bsize, NOCRED, 0, &bp);
+ amp->bsize, 0, &bp);
if (error)
goto bad;
ap->fsize = adoswordn(bp, ap->nwords - 47);
@@ -609,7 +609,7 @@
bp = mapbp = NULL;
bn = amp->rootb;
if ((error = bread(amp->devvp, bn * amp->bsize / DEV_BSIZE, amp->bsize,
- NOCRED, 0, &bp)) != 0) {
+ 0, &bp)) != 0) {
return (error);
}
blkix = amp->nwords - 49;
@@ -626,7 +626,7 @@
brelse(mapbp, 0);
if ((error = bread(amp->devvp,
adoswordn(bp, blkix) * amp->bsize / DEV_BSIZE, amp->bsize,
- NOCRED, 0, &mapbp)) != 0)
+ 0, &mapbp)) != 0)
break;
if (adoscksum(mapbp, amp->nwords)) {
#ifdef DIAGNOSTIC
@@ -653,7 +653,7 @@
bn = adoswordn(bp, blkix);
brelse(bp, 0);
if ((error = bread(amp->devvp, bn * amp->bsize / DEV_BSIZE,
- amp->bsize, NOCRED, 0, &bp)) != 0)
+ amp->bsize, 0, &bp)) != 0)
break;
/*
* Why is there no checksum on these blocks?
diff -r adcb329ada25 -r 0d4c28a8fe27 sys/fs/adosfs/advnops.c
--- a/sys/fs/adosfs/advnops.c Sat Mar 28 17:45:47 2015 +0000
+++ b/sys/fs/adosfs/advnops.c Sat Mar 28 19:24:04 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: advnops.c,v 1.45 2014/08/05 08:50:54 hannken Exp $ */
+/* $NetBSD: advnops.c,v 1.46 2015/03/28 19:24:05 maxv Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: advnops.c,v 1.45 2014/08/05 08:50:54 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: advnops.c,v 1.46 2015/03/28 19:24:05 maxv Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -296,7 +296,7 @@
* but not much as ados makes little attempt to
* make things contigous
*/
- error = bread(sp->a_vp, lbn, amp->bsize, NOCRED, 0, &bp);
+ error = bread(sp->a_vp, lbn, amp->bsize, 0, &bp);
if (error) {
goto reterr;
}
@@ -516,7 +516,7 @@
goto reterr;
}
error = bread(ap->amp->devvp, nb * ap->amp->bsize / DEV_BSIZE,
- ap->amp->bsize, NOCRED, 0, &flbp);
+ ap->amp->bsize, 0, &flbp);
if (error) {
goto reterr;
}
diff -r adcb329ada25 -r 0d4c28a8fe27 sys/fs/cd9660/cd9660_lookup.c
--- a/sys/fs/cd9660/cd9660_lookup.c Sat Mar 28 17:45:47 2015 +0000
+++ b/sys/fs/cd9660/cd9660_lookup.c Sat Mar 28 19:24:04 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cd9660_lookup.c,v 1.29 2014/06/16 09:55:49 hannken Exp $ */
+/* $NetBSD: cd9660_lookup.c,v 1.30 2015/03/28 19:24:05 maxv Exp $ */
/*-
* Copyright (c) 1989, 1993, 1994
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cd9660_lookup.c,v 1.29 2014/06/16 09:55:49 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cd9660_lookup.c,v 1.30 2015/03/28 19:24:05 maxv Exp $");
#include <sys/param.h>
#include <sys/namei.h>
@@ -394,7 +394,7 @@
*bpp = NULL;
return error;
}
- if ((error = bread(devvp, lbn, bsize, NOCRED, 0, &bp)) != 0) {
+ if ((error = bread(devvp, lbn, bsize, 0, &bp)) != 0) {
*bpp = NULL;
return (error);
}
diff -r adcb329ada25 -r 0d4c28a8fe27 sys/fs/cd9660/cd9660_rrip.c
--- a/sys/fs/cd9660/cd9660_rrip.c Sat Mar 28 17:45:47 2015 +0000
+++ b/sys/fs/cd9660/cd9660_rrip.c Sat Mar 28 19:24:04 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cd9660_rrip.c,v 1.17 2011/09/27 01:27:44 christos Exp $ */
+/* $NetBSD: cd9660_rrip.c,v 1.18 2015/03/28 19:24:05 maxv Exp $ */
/*-
* Copyright (c) 1993, 1994
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cd9660_rrip.c,v 1.17 2011/09/27 01:27:44 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cd9660_rrip.c,v 1.18 2015/03/28 19:24:05 maxv Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -548,7 +548,7 @@
|| ana->iso_ce_off + ana->iso_ce_len > ana->imp->logical_block_size
|| bread(ana->imp->im_devvp,
ana->iso_ce_blk << (ana->imp->im_bshift - DEV_BSHIFT),
- ana->imp->logical_block_size, NOCRED,
+ ana->imp->logical_block_size,
0, &bp))
/* what to do now? */
break;
diff -r adcb329ada25 -r 0d4c28a8fe27 sys/fs/cd9660/cd9660_vfsops.c
--- a/sys/fs/cd9660/cd9660_vfsops.c Sat Mar 28 17:45:47 2015 +0000
+++ b/sys/fs/cd9660/cd9660_vfsops.c Sat Mar 28 19:24:04 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cd9660_vfsops.c,v 1.89 2014/07/09 08:43:54 maxv Exp $ */
+/* $NetBSD: cd9660_vfsops.c,v 1.90 2015/03/28 19:24:05 maxv Exp $ */
/*-
* Copyright (c) 1994
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cd9660_vfsops.c,v 1.89 2014/07/09 08:43:54 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cd9660_vfsops.c,v 1.90 2015/03/28 19:24:05 maxv Exp $");
#if defined(_KERNEL_OPT)
#include "opt_compat_netbsd.h"
@@ -381,7 +381,7 @@
for (iso_blknum = 16; iso_blknum < 100; iso_blknum++) {
if ((error = bread(devvp, (iso_blknum+sess) * btodb(iso_bsize),
- iso_bsize, NOCRED, 0, &bp)) != 0)
+ iso_bsize, 0, &bp)) != 0)
goto out;
vdp = (struct iso_volume_descriptor *)bp->b_data;
@@ -458,7 +458,7 @@
if ((error = bread(isomp->im_devvp,
(isomp->root_extent + ext_attr_length) <<
(isomp->im_bshift - DEV_BSHIFT),
- isomp->logical_block_size, NOCRED,
+ isomp->logical_block_size,
0, &bp)) != 0)
goto out;
@@ -734,7 +734,7 @@
error = bread(imp->im_devvp,
lbn << (imp->im_bshift - DEV_BSHIFT),
- imp->logical_block_size, NOCRED, 0, &bp);
+ imp->logical_block_size, 0, &bp);
if (error) {
pool_put(&cd9660_node_pool, ip);
printf("fhtovp: bread error %d\n",error);
diff -r adcb329ada25 -r 0d4c28a8fe27 sys/fs/cd9660/cd9660_vnops.c
--- a/sys/fs/cd9660/cd9660_vnops.c Sat Mar 28 17:45:47 2015 +0000
+++ b/sys/fs/cd9660/cd9660_vnops.c Sat Mar 28 19:24:04 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cd9660_vnops.c,v 1.50 2015/03/28 17:23:42 maxv Exp $ */
+/* $NetBSD: cd9660_vnops.c,v 1.51 2015/03/28 19:24:05 maxv Exp $ */
/*-
* Copyright (c) 1994
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cd9660_vnops.c,v 1.50 2015/03/28 17:23:42 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cd9660_vnops.c,v 1.51 2015/03/28 19:24:05 maxv Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -264,7 +264,7 @@
error = breadn(vp, lbn, size, &rablock,
&rasize, 1, 0, &bp);
} else {
- error = bread(vp, lbn, size, NOCRED, 0, &bp);
+ error = bread(vp, lbn, size, 0, &bp);
}
if (error) {
return (error);
@@ -600,7 +600,7 @@
error = bread(imp->im_devvp,
(ip->i_number >> imp->im_bshift) <<
(imp->im_bshift - DEV_BSHIFT),
- imp->logical_block_size, NOCRED, 0, &bp);
+ imp->logical_block_size, 0, &bp);
if (error) {
return (EINVAL);
}
diff -r adcb329ada25 -r 0d4c28a8fe27 sys/fs/efs/efs_subr.c
--- a/sys/fs/efs/efs_subr.c Sat Mar 28 17:45:47 2015 +0000
+++ b/sys/fs/efs/efs_subr.c Sat Mar 28 19:24:04 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: efs_subr.c,v 1.10 2013/10/30 08:27:01 mrg Exp $ */
+/* $NetBSD: efs_subr.c,v 1.11 2015/03/28 19:24:05 maxv Exp $ */
/*
* Copyright (c) 2006 Stephen M. Rumble <rumble%ephemeral.org@localhost>
@@ -17,7 +17,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: efs_subr.c,v 1.10 2013/10/30 08:27:01 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: efs_subr.c,v 1.11 2015/03/28 19:24:05 maxv Exp $");
#include <sys/param.h>
#include <sys/kauth.h>
@@ -188,7 +188,7 @@
Home |
Main Index |
Thread Index |
Old Index