bread doesn't need the cred argument, remove it.
Index: isofs/cd9660/cd9660_lookup.c
===================================================================
RCS file: /cvs/src/sys/isofs/cd9660/cd9660_lookup.c,v
retrieving revision 1.17
diff -u -r1.17 cd9660_lookup.c
--- isofs/cd9660/cd9660_lookup.c 17 Jan 2010 20:25:58 -0000 1.17
+++ isofs/cd9660/cd9660_lookup.c 3 Jul 2011 23:08:18 -0000
@@ -438,7 +438,7 @@
lbn = lblkno(imp, offset);
bsize = blksize(imp, ip, lbn);
- if ((error = bread(vp, lbn, bsize, NOCRED, &bp)) != 0) {
+ if ((error = bread(vp, lbn, bsize, &bp)) != 0) {
brelse(bp);
*bpp = NULL;
return (error);
Index: isofs/cd9660/cd9660_rrip.c
===================================================================
RCS file: /cvs/src/sys/isofs/cd9660/cd9660_rrip.c,v
retrieving revision 1.9
diff -u -r1.9 cd9660_rrip.c
--- isofs/cd9660/cd9660_rrip.c 14 Feb 2007 00:53:48 -0000 1.9
+++ isofs/cd9660/cd9660_rrip.c 3 Jul 2011 23:08:19 -0000
@@ -590,7 +590,7 @@
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, &bp))
+ ana->imp->logical_block_size, &bp))
/* what to do now? */
break;
phead =
Index: isofs/cd9660/cd9660_vfsops.c
===================================================================
RCS file: /cvs/src/sys/isofs/cd9660/cd9660_vfsops.c,v
retrieving revision 1.58
diff -u -r1.58 cd9660_vfsops.c
--- isofs/cd9660/cd9660_vfsops.c 16 Apr 2011 03:21:15 -0000 1.58
+++ isofs/cd9660/cd9660_vfsops.c 3 Jul 2011 23:08:19 -0000
@@ -283,7 +283,7 @@
for (iso_blknum = 16; iso_blknum < 100; iso_blknum++) {
if ((error = bread(devvp,
(iso_blknum + sess) * btodb(iso_bsize),
- iso_bsize, NOCRED, &bp)) != 0)
+ iso_bsize, &bp)) != 0)
goto out;
vdp = (struct iso_volume_descriptor *)bp->b_data;
@@ -386,7 +386,7 @@
if ((error = bread(isomp->im_devvp, (isomp->root_extent +
isonum_711(rootp->ext_attr_length)) <<
(isomp->im_bshift - DEV_BSHIFT),
- isomp->logical_block_size, NOCRED, &bp)) != 0)
+ isomp->logical_block_size, &bp)) != 0)
goto out;
rootp = (struct iso_directory_record *)bp->b_data;
@@ -815,7 +815,7 @@
error = bread(imp->im_devvp,
lbn << (imp->im_bshift - DEV_BSHIFT),
- imp->logical_block_size, NOCRED, &bp);
+ imp->logical_block_size, &bp);
if (error) {
vput(vp);
brelse(bp);
Index: isofs/cd9660/cd9660_vnops.c
===================================================================
RCS file: /cvs/src/sys/isofs/cd9660/cd9660_vnops.c,v
retrieving revision 1.53
diff -u -r1.53 cd9660_vnops.c
--- isofs/cd9660/cd9660_vnops.c 5 Apr 2011 14:14:07 -0000 1.53
+++ isofs/cd9660/cd9660_vnops.c 3 Jul 2011 23:08:19 -0000
@@ -326,10 +326,10 @@
ra->sizes[i] = blksize(imp, ip, rablock + i);
}
error = breadn(vp, lbn, size, ra->blks,
- ra->sizes, i, NOCRED, &bp);
+ ra->sizes, i, &bp);
free(ra, M_TEMP);
} else
- error = bread(vp, lbn, size, NOCRED, &bp);
+ error = bread(vp, lbn, size, &bp);
ci->ci_lastr = lbn;
n = min(n, size - bp->b_resid);
if (error) {
@@ -700,7 +700,7 @@
error = bread(imp->im_devvp,
(ip->i_number >> imp->im_bshift) <<
(imp->im_bshift - DEV_BSHIFT),
- imp->logical_block_size, NOCRED, &bp);
+ imp->logical_block_size, &bp);
if (error) {
brelse(bp);
return (EINVAL);
Index: isofs/udf/udf.h
===================================================================
RCS file: /cvs/src/sys/isofs/udf/udf.h,v
retrieving revision 1.13
diff -u -r1.13 udf.h
--- isofs/udf/udf.h 14 Aug 2009 22:23:45 -0000 1.13
+++ isofs/udf/udf.h 3 Jul 2011 23:08:19 -0000
@@ -104,7 +104,7 @@
* Can the block layer be forced to use a different block size?
*/
#define RDSECTOR(devvp, sector, size, bp) \
- bread(devvp, sector << (ump->um_bshift - DEV_BSHIFT), size, NOCRED, bp)
+ bread(devvp, sector << (ump->um_bshift - DEV_BSHIFT), size, bp)
static __inline int
udf_readlblks(struct umount *ump, int sector, int size, struct buf **bp)
Index: isofs/udf/udf_vfsops.c
===================================================================
RCS file: /cvs/src/sys/isofs/udf/udf_vfsops.c,v
retrieving revision 1.36
diff -u -r1.36 udf_vfsops.c
--- isofs/udf/udf_vfsops.c 21 Dec 2010 20:14:43 -0000 1.36
+++ isofs/udf/udf_vfsops.c 3 Jul 2011 23:08:19 -0000
@@ -270,8 +270,7 @@
* Should also check sector n - 256, n, and 512.
*/
sector = 256;
- if ((error = bread(devvp, sector * btodb(bsize), bsize, NOCRED,
- &bp)) != 0)
+ if ((error = bread(devvp, sector * btodb(bsize), bsize, &bp)) != 0)
goto bail;
if ((error = udf_checktag((struct desc_tag *)bp->b_data, TAGID_ANCHOR)))
goto bail;
@@ -290,7 +289,7 @@
mvds_end = mvds_start + (letoh32(avdp.main_vds_ex.len) - 1) / bsize;
for (sector = mvds_start; sector < mvds_end; sector++) {
if ((error = bread(devvp, sector * btodb(bsize), bsize,
- NOCRED, &bp)) != 0) {
+ &bp)) != 0) {
printf("Can't read sector %d of VDS\n", sector);
goto bail;
}
Index: kern/vfs_bio.c
===================================================================
RCS file: /cvs/src/sys/kern/vfs_bio.c,v
retrieving revision 1.130
diff -u -r1.130 vfs_bio.c
--- kern/vfs_bio.c 5 Jun 2011 19:41:04 -0000 1.130
+++ kern/vfs_bio.c 3 Jul 2011 23:08:19 -0000
@@ -403,8 +403,7 @@
* This algorithm described in Bach (p.54).
*/
int
-bread(struct vnode *vp, daddr64_t blkno, int size, struct ucred *cred,
- struct buf **bpp)
+bread(struct vnode *vp, daddr64_t blkno, int size, struct buf **bpp)
{
struct buf *bp;
@@ -421,7 +420,7 @@
*/
int
breadn(struct vnode *vp, daddr64_t blkno, int size, daddr64_t rablks[],
- int rasizes[], int nrablks, struct ucred *cred, struct buf **bpp)
+ int rasizes[], int nrablks, struct buf **bpp)
{
struct buf *bp;
int i;
Index: kern/vfs_cluster.c
===================================================================
RCS file: /cvs/src/sys/kern/vfs_cluster.c,v
retrieving revision 1.37
diff -u -r1.37 vfs_cluster.c
--- kern/vfs_cluster.c 26 May 2007 20:26:51 -0000 1.37
+++ kern/vfs_cluster.c 3 Jul 2011 23:08:19 -0000
@@ -235,7 +235,7 @@
buflist->bs_nchildren = 0;
buflist->bs_children = (struct buf **)(buflist + 1);
for (lbn = ci->ci_cstart, i = 0; i < len; lbn++, i++)
- (void)bread(vp, lbn, last_bp->b_bcount, NOCRED,
+ (void)bread(vp, lbn, last_bp->b_bcount,
&buflist->bs_children[i]);
buflist->bs_children[i] = last_bp;
buflist->bs_nchildren = i + 1;
Index: miscfs/specfs/spec_vnops.c
===================================================================
RCS file: /cvs/src/sys/miscfs/specfs/spec_vnops.c,v
retrieving revision 1.62
diff -u -r1.62 spec_vnops.c
--- miscfs/specfs/spec_vnops.c 5 Apr 2011 14:14:07 -0000 1.62
+++ miscfs/specfs/spec_vnops.c 3 Jul 2011 23:08:19 -0000
@@ -240,9 +240,9 @@
if (vp->v_lastr + bscale == bn) {
nextbn = bn + bscale;
error = breadn(vp, bn, bsize, &nextbn, &bsize,
- 1, NOCRED, &bp);
+ 1, &bp);
} else
- error = bread(vp, bn, bsize, NOCRED, &bp);
+ error = bread(vp, bn, bsize, &bp);
vp->v_lastr = bn;
n = min(n, bsize - bp->b_resid);
if (error) {
@@ -325,7 +325,7 @@
bn = btodb(uio->uio_offset) & ~(bscale - 1);
on = uio->uio_offset % bsize;
n = min((bsize - on), uio->uio_resid);
- error = bread(vp, bn, bsize, NOCRED, &bp);
+ error = bread(vp, bn, bsize, &bp);
n = min(n, bsize - bp->b_resid);
if (error) {
brelse(bp);
Index: msdosfs/msdosfs_denode.c
===================================================================
RCS file: /cvs/src/sys/msdosfs/msdosfs_denode.c,v
retrieving revision 1.42
diff -u -r1.42 msdosfs_denode.c
--- msdosfs/msdosfs_denode.c 21 Dec 2010 20:14:43 -0000 1.42
+++ msdosfs/msdosfs_denode.c 3 Jul 2011 23:08:19 -0000
@@ -430,12 +430,10 @@
if ((boff = length & pmp->pm_crbomask) != 0) {
if (isadir) {
bn = cntobn(pmp, eofentry);
- error = bread(pmp->pm_devvp, bn, pmp->pm_bpcluster,
- NOCRED, &bp);
+ error = bread(pmp->pm_devvp, bn, pmp->pm_bpcluster,
&bp);
} else {
bn = de_blk(pmp, length);
- error = bread(DETOV(dep), bn, pmp->pm_bpcluster,
- NOCRED, &bp);
+ error = bread(DETOV(dep), bn, pmp->pm_bpcluster, &bp);
}
if (error) {
brelse(bp);
Index: msdosfs/msdosfs_fat.c
===================================================================
RCS file: /cvs/src/sys/msdosfs/msdosfs_fat.c,v
retrieving revision 1.21
diff -u -r1.21 msdosfs_fat.c
--- msdosfs/msdosfs_fat.c 13 Aug 2009 22:34:29 -0000 1.21
+++ msdosfs/msdosfs_fat.c 3 Jul 2011 23:08:19 -0000
@@ -215,7 +215,7 @@
if (bn != bp_bn) {
if (bp)
brelse(bp);
- error = bread(pmp->pm_devvp, bn, bsize, NOCRED, &bp);
+ error = bread(pmp->pm_devvp, bn, bsize, &bp);
if (error) {
brelse(bp);
return (error);
@@ -331,7 +331,7 @@
* If we have an FSInfo block, update it.
*/
if (pmp->pm_fsinfo) {
- if (bread(pmp->pm_devvp, pmp->pm_fsinfo, fsi_size(pmp), NOCRED,
+ if (bread(pmp->pm_devvp, pmp->pm_fsinfo, fsi_size(pmp),
&bpn) != 0) {
/*
* Ignore the error, but turn off FSInfo update for the
future.
@@ -501,7 +501,7 @@
byteoffset = FATOFS(pmp, cn);
fatblock(pmp, byteoffset, &bn, &bsize, &bo);
- if ((error = bread(pmp->pm_devvp, bn, bsize, NOCRED, &bp)) != 0) {
+ if ((error = bread(pmp->pm_devvp, bn, bsize, &bp)) != 0) {
brelse(bp);
return (error);
}
@@ -583,7 +583,7 @@
while (count > 0) {
byteoffset = FATOFS(pmp, start);
fatblock(pmp, byteoffset, &bn, &bsize, &bo);
- error = bread(pmp->pm_devvp, bn, bsize, NOCRED, &bp);
+ error = bread(pmp->pm_devvp, bn, bsize, &bp);
if (error) {
brelse(bp);
return (error);
@@ -809,7 +809,7 @@
if (lbn != bn) {
if (bp)
updatefats(pmp, bp, lbn);
- error = bread(pmp->pm_devvp, bn, bsize, NOCRED, &bp);
+ error = bread(pmp->pm_devvp, bn, bsize, &bp);
if (error) {
brelse(bp);
return (error);
@@ -883,7 +883,7 @@
if (bp)
brelse(bp);
fatblock(pmp, byteoffset, &bn, &bsize, NULL);
- error = bread(pmp->pm_devvp, bn, bsize, NOCRED, &bp);
+ error = bread(pmp->pm_devvp, bn, bsize, &bp);
if (error) {
brelse(bp);
return (error);
Index: msdosfs/msdosfs_lookup.c
===================================================================
RCS file: /cvs/src/sys/msdosfs/msdosfs_lookup.c,v
retrieving revision 1.23
diff -u -r1.23 msdosfs_lookup.c
--- msdosfs/msdosfs_lookup.c 17 Jan 2010 20:23:58 -0000 1.23
+++ msdosfs/msdosfs_lookup.c 3 Jul 2011 23:08:20 -0000
@@ -231,7 +231,7 @@
break;
return (error);
}
- error = bread(pmp->pm_devvp, bn, blsize, NOCRED, &bp);
+ error = bread(pmp->pm_devvp, bn, blsize, &bp);
if (error) {
brelse(bp);
return (error);
@@ -643,7 +643,7 @@
diroffset = ddep->de_fndoffset;
if (dirclust != MSDOSFSROOT)
diroffset &= pmp->pm_crbomask;
- if ((error = bread(pmp->pm_devvp, bn, blsize, NOCRED, &bp)) != 0) {
+ if ((error = bread(pmp->pm_devvp, bn, blsize, &bp)) != 0) {
brelse(bp);
return error;
}
@@ -673,8 +673,7 @@
if (error)
return error;
- error = bread(pmp->pm_devvp, bn, blsize,
- NOCRED, &bp);
+ error = bread(pmp->pm_devvp, bn, blsize, &bp);
if (error) {
brelse(bp);
return error;
@@ -737,7 +736,7 @@
return (1); /* it's empty */
return (0);
}
- error = bread(pmp->pm_devvp, bn, blsize, NOCRED, &bp);
+ error = bread(pmp->pm_devvp, bn, blsize, &bp);
if (error) {
brelse(bp);
return (0);
@@ -828,7 +827,7 @@
}
scn = dep->de_StartCluster;
error = bread(pmp->pm_devvp, cntobn(pmp, scn),
- pmp->pm_bpcluster, NOCRED, &bp);
+ pmp->pm_bpcluster, &bp);
if (error)
break;
@@ -891,7 +890,7 @@
&& de_blk(pmp, diroffset + blsize) > pmp->pm_rootdirsize)
blsize = de_bn2off(pmp, pmp->pm_rootdirsize) & pmp->pm_crbomask;
bn = detobn(pmp, dirclust, diroffset);
- if ((error = bread(pmp->pm_devvp, bn, blsize, NOCRED, bpp)) != 0) {
+ if ((error = bread(pmp->pm_devvp, bn, blsize, bpp)) != 0) {
brelse(*bpp);
*bpp = NULL;
return (error);
@@ -948,7 +947,7 @@
error = pcbmap(pdep, de_cluster(pmp, offset), &bn, 0, &blsize);
if (error)
return error;
- error = bread(pmp->pm_devvp, bn, blsize, NOCRED, &bp);
+ error = bread(pmp->pm_devvp, bn, blsize, &bp);
if (error) {
brelse(bp);
return error;
@@ -1018,7 +1017,7 @@
return 0;
return error;
}
- error = bread(pmp->pm_devvp, bn, blsize, NOCRED, &bp);
+ error = bread(pmp->pm_devvp, bn, blsize, &bp);
if (error) {
brelse(bp);
return error;
@@ -1070,7 +1069,7 @@
for (cn = 0;; cn++) {
if (pcbmap(dep, cn, &bn, 0, &blsize))
return 0;
- if (bread(pmp->pm_devvp, bn, blsize, NOCRED, &bp)) {
+ if (bread(pmp->pm_devvp, bn, blsize, &bp)) {
brelse(bp);
return 0;
}
Index: msdosfs/msdosfs_vfsops.c
===================================================================
RCS file: /cvs/src/sys/msdosfs/msdosfs_vfsops.c,v
retrieving revision 1.59
diff -u -r1.59 msdosfs_vfsops.c
--- msdosfs/msdosfs_vfsops.c 17 Nov 2010 12:27:03 -0000 1.59
+++ msdosfs/msdosfs_vfsops.c 3 Jul 2011 23:08:20 -0000
@@ -308,7 +308,7 @@
* Read the boot sector of the filesystem, and then check the
* boot signature. If not a dos boot sector then error out.
*/
- if ((error = bread(devvp, 0, 4096, NOCRED, &bp)) != 0)
+ if ((error = bread(devvp, 0, 4096, &bp)) != 0)
goto error_exit;
bp->b_flags |= B_AGE;
bsp = (union bootsector *)bp->b_data;
@@ -485,7 +485,7 @@
struct fsinfo *fp;
if ((error = bread(devvp, pmp->pm_fsinfo, fsi_size(pmp),
- NOCRED, &bp)) != 0)
+ &bp)) != 0)
goto error_exit;
fp = (struct fsinfo *)bp->b_data;
if (!bcmp(fp->fsisig1, "RRaA", 4)
Index: msdosfs/msdosfs_vnops.c
===================================================================
RCS file: /cvs/src/sys/msdosfs/msdosfs_vnops.c,v
retrieving revision 1.77
diff -u -r1.77 msdosfs_vnops.c
--- msdosfs/msdosfs_vnops.c 5 Apr 2011 14:14:07 -0000 1.77
+++ msdosfs/msdosfs_vnops.c 3 Jul 2011 23:08:20 -0000
@@ -471,7 +471,7 @@
* vnode for the directory.
*/
if (isadir) {
- error = bread(pmp->pm_devvp, lbn, blsize, NOCRED, &bp);
+ error = bread(pmp->pm_devvp, lbn, blsize, &bp);
} else {
rablock = lbn + 1;
rablkno = de_cn2bn(pmp, rablock);
@@ -479,10 +479,10 @@
de_cn2off(pmp, rablock) < dep->de_FileSize)
error = breadn(vp, de_cn2bn(pmp, lbn),
pmp->pm_bpcluster, &rablkno,
- &pmp->pm_bpcluster, 1, NOCRED, &bp);
+ &pmp->pm_bpcluster, 1, &bp);
else
error = bread(vp, de_cn2bn(pmp, lbn),
- pmp->pm_bpcluster, NOCRED, &bp);
+ pmp->pm_bpcluster, &bp);
dep->de_lastr = lbn;
}
n = min(n, pmp->pm_bpcluster - bp->b_resid);
@@ -630,8 +630,7 @@
/*
* The block we need to write into exists, so read it
in.
*/
- error = bread(thisvp, bn, pmp->pm_bpcluster,
- NOCRED, &bp);
+ error = bread(thisvp, bn, pmp->pm_bpcluster, &bp);
if (error) {
brelse(bp);
break;
@@ -1101,8 +1100,7 @@
panic("msdosfs_rename: updating .. in root directory?");
} else
bn = cntobn(pmp, cn);
- error = bread(pmp->pm_devvp, bn, pmp->pm_bpcluster,
- NOCRED, &bp);
+ error = bread(pmp->pm_devvp, bn, pmp->pm_bpcluster, &bp);
if (error) {
/* XXX should really panic here, fs is corrupt */
brelse(bp);
@@ -1479,7 +1477,7 @@
n = min(n, diff);
if ((error = pcbmap(dep, lbn, &bn, &cn, &blsize)) != 0)
break;
- error = bread(pmp->pm_devvp, bn, blsize, NOCRED, &bp);
+ error = bread(pmp->pm_devvp, bn, blsize, &bp);
if (error) {
brelse(bp);
return (error);
Index: ntfs/ntfs_subr.c
===================================================================
RCS file: /cvs/src/sys/ntfs/ntfs_subr.c,v
retrieving revision 1.23
diff -u -r1.23 ntfs_subr.c
--- ntfs/ntfs_subr.c 9 Sep 2010 11:31:40 -0000 1.23
+++ ntfs/ntfs_subr.c 3 Jul 2011 23:08:20 -0000
@@ -292,9 +292,8 @@
bn = ntfs_cntobn(ntmp->ntm_mftcn) +
ntmp->ntm_bpmftrec * ip->i_number;
- error = bread(ntmp->ntm_devvp,
- bn, ntfs_bntob(ntmp->ntm_bpmftrec),
- NOCRED, &bp);
+ error = bread(ntmp->ntm_devvp, bn,
+ ntfs_bntob(ntmp->ntm_bpmftrec), &bp);
if (error) {
printf("ntfs_loadntnode: BREAD FAILED\n");
brelse(bp);
@@ -1509,7 +1508,7 @@
clrbuf(bp);
} else {
error = bread(ntmp->ntm_devvp, ntfs_cntobn(cn),
- ntfs_cntob(cl), NOCRED, &bp);
+ ntfs_cntob(cl), &bp);
if (error) {
brelse(bp);
return (error);
@@ -1618,7 +1617,7 @@
error = bread(ntmp->ntm_devvp,
ntfs_cntobn(cn),
ntfs_cntob(cl),
- NOCRED, &bp);
+ &bp);
if (error) {
brelse(bp);
return (error);
Index: ntfs/ntfs_vfsops.c
===================================================================
RCS file: /cvs/src/sys/ntfs/ntfs_vfsops.c,v
retrieving revision 1.25
diff -u -r1.25 ntfs_vfsops.c
--- ntfs/ntfs_vfsops.c 3 Apr 2011 17:17:41 -0000 1.25
+++ ntfs/ntfs_vfsops.c 3 Jul 2011 23:08:20 -0000
@@ -359,7 +359,7 @@
bp = NULL;
- error = bread(devvp, BBLOCK, BBSIZE, NOCRED, &bp);
+ error = bread(devvp, BBLOCK, BBSIZE, &bp);
if (error)
goto out;
ntmp = malloc(sizeof *ntmp, M_NTFSMNT, M_WAITOK | M_ZERO);
Index: sys/buf.h
===================================================================
RCS file: /cvs/src/sys/sys/buf.h,v
retrieving revision 1.77
diff -u -r1.77 buf.h
--- sys/buf.h 5 Jun 2011 19:41:08 -0000 1.77
+++ sys/buf.h 3 Jul 2011 23:08:21 -0000
@@ -268,9 +268,9 @@
void bdwrite(struct buf *);
void biodone(struct buf *);
int biowait(struct buf *);
-int bread(struct vnode *, daddr64_t, int, struct ucred *, struct buf **);
+int bread(struct vnode *, daddr64_t, int, struct buf **);
int breadn(struct vnode *, daddr64_t, int, daddr64_t *, int *, int,
- struct ucred *, struct buf **);
+ struct buf **);
void brelse(struct buf *);
void bremfree(struct buf *);
void bufinit(void);
Index: ufs/ext2fs/ext2fs_alloc.c
===================================================================
RCS file: /cvs/src/sys/ufs/ext2fs/ext2fs_alloc.c,v
retrieving revision 1.25
diff -u -r1.25 ext2fs_alloc.c
--- ufs/ext2fs/ext2fs_alloc.c 5 Jan 2008 19:49:26 -0000 1.25
+++ ufs/ext2fs/ext2fs_alloc.c 3 Jul 2011 23:08:21 -0000
@@ -324,7 +324,7 @@
return (0);
error = bread(ip->i_devvp, fsbtodb(fs,
fs->e2fs_gd[cg].ext2bgd_b_bitmap),
- (int)fs->e2fs_bsize, NOCRED, &bp);
+ (int)fs->e2fs_bsize, &bp);
if (error || fs->e2fs_gd[cg].ext2bgd_nbfree == 0) {
brelse(bp);
return (0);
@@ -409,7 +409,7 @@
return (0);
error = bread(ip->i_devvp, fsbtodb(fs,
fs->e2fs_gd[cg].ext2bgd_i_bitmap),
- (int)fs->e2fs_bsize, NOCRED, &bp);
+ (int)fs->e2fs_bsize, &bp);
if (error) {
brelse(bp);
return (0);
@@ -480,7 +480,7 @@
}
error = bread(ip->i_devvp,
fsbtodb(fs, fs->e2fs_gd[cg].ext2bgd_b_bitmap),
- (int)fs->e2fs_bsize, NOCRED, &bp);
+ (int)fs->e2fs_bsize, &bp);
if (error) {
brelse(bp);
return;
@@ -520,7 +520,7 @@
cg = ino_to_cg(fs, ino);
error = bread(pip->i_devvp,
fsbtodb(fs, fs->e2fs_gd[cg].ext2bgd_i_bitmap),
- (int)fs->e2fs_bsize, NOCRED, &bp);
+ (int)fs->e2fs_bsize, &bp);
if (error) {
brelse(bp);
return (0);
Index: ufs/ext2fs/ext2fs_balloc.c
===================================================================
RCS file: /cvs/src/sys/ufs/ext2fs/ext2fs_balloc.c,v
retrieving revision 1.17
diff -u -r1.17 ext2fs_balloc.c
--- ufs/ext2fs/ext2fs_balloc.c 5 Sep 2009 17:23:43 -0000 1.17
+++ ufs/ext2fs/ext2fs_balloc.c 3 Jul 2011 23:08:21 -0000
@@ -82,7 +82,7 @@
if (bn < NDADDR) {
nb = fs2h32(ip->i_e2fs_blocks[bn]);
if (nb != 0) {
- error = bread(vp, bn, fs->e2fs_bsize, NOCRED, &bp);
+ error = bread(vp, bn, fs->e2fs_bsize, &bp);
if (error) {
brelse(bp);
return (error);
@@ -153,8 +153,7 @@
* Fetch through the indirect blocks, allocating as necessary.
*/
for (i = 1;;) {
- error = bread(vp,
- indirs[i].in_lbn, (int)fs->e2fs_bsize, NOCRED, &bp);
+ error = bread(vp, indirs[i].in_lbn, (int)fs->e2fs_bsize, &bp);
if (error) {
brelse(bp);
goto fail;
@@ -234,7 +233,7 @@
}
brelse(bp);
if (flags & B_CLRBUF) {
- error = bread(vp, lbn, (int)fs->e2fs_bsize, NOCRED, &nbp);
+ error = bread(vp, lbn, (int)fs->e2fs_bsize, &nbp);
if (error) {
brelse(nbp);
goto fail;
@@ -262,7 +261,7 @@
int r;
r = bread(vp, indirs[unwindidx].in_lbn,
- (int)fs->e2fs_bsize, NOCRED, &bp);
+ (int)fs->e2fs_bsize, &bp);
if (r) {
panic("Could not unwind indirect block, error
%d", r);
} else {
Index: ufs/ext2fs/ext2fs_inode.c
===================================================================
RCS file: /cvs/src/sys/ufs/ext2fs/ext2fs_inode.c,v
retrieving revision 1.43
diff -u -r1.43 ext2fs_inode.c
--- ufs/ext2fs/ext2fs_inode.c 23 Nov 2008 23:52:35 -0000 1.43
+++ ufs/ext2fs/ext2fs_inode.c 3 Jul 2011 23:08:21 -0000
@@ -180,7 +180,7 @@
fs = ip->i_e2fs;
error = bread(ip->i_devvp,
fsbtodb(fs, ino_to_fsba(fs, ip->i_number)),
- (int)fs->e2fs_bsize, NOCRED, &bp);
+ (int)fs->e2fs_bsize, &bp);
if (error) {
brelse(bp);
return (error);
Index: ufs/ext2fs/ext2fs_readwrite.c
===================================================================
RCS file: /cvs/src/sys/ufs/ext2fs/ext2fs_readwrite.c,v
retrieving revision 1.22
diff -u -r1.22 ext2fs_readwrite.c
--- ufs/ext2fs/ext2fs_readwrite.c 17 Jun 2007 20:15:25 -0000 1.22
+++ ufs/ext2fs/ext2fs_readwrite.c 3 Jul 2011 23:08:21 -0000
@@ -112,13 +112,13 @@
xfersize = bytesinfile;
if (lblktosize(fs, nextlbn) >= ext2fs_size(ip))
- error = bread(vp, lbn, size, NOCRED, &bp);
+ error = bread(vp, lbn, size, &bp);
else if (lbn - 1 == ip->i_ci.ci_lastr) {
int nextsize = fs->e2fs_bsize;
- error = breadn(vp, lbn,
- size, &nextlbn, &nextsize, 1, NOCRED, &bp);
+ error = breadn(vp, lbn, size, &nextlbn, &nextsize,
+ 1, &bp);
} else
- error = bread(vp, lbn, size, NOCRED, &bp);
+ error = bread(vp, lbn, size, &bp);
if (error)
break;
ip->i_ci.ci_lastr = lbn;
Index: ufs/ext2fs/ext2fs_subr.c
===================================================================
RCS file: /cvs/src/sys/ufs/ext2fs/ext2fs_subr.c,v
retrieving revision 1.25
diff -u -r1.25 ext2fs_subr.c
--- ufs/ext2fs/ext2fs_subr.c 3 Jul 2011 18:23:10 -0000 1.25
+++ ufs/ext2fs/ext2fs_subr.c 3 Jul 2011 23:08:21 -0000
@@ -90,7 +90,7 @@
lbn = lblkno(fs, offset);
*bpp = NULL;
- if ((error = bread(vp, lbn, fs->e2fs_bsize, NOCRED, &bp)) != 0) {
+ if ((error = bread(vp, lbn, fs->e2fs_bsize, &bp)) != 0) {
brelse(bp);
return (error);
}
Index: ufs/ext2fs/ext2fs_vfsops.c
===================================================================
RCS file: /cvs/src/sys/ufs/ext2fs/ext2fs_vfsops.c,v
retrieving revision 1.61
diff -u -r1.61 ext2fs_vfsops.c
--- ufs/ext2fs/ext2fs_vfsops.c 3 Jul 2011 18:23:10 -0000 1.61
+++ ufs/ext2fs/ext2fs_vfsops.c 3 Jul 2011 23:08:21 -0000
@@ -359,7 +359,7 @@
ip = VTOI(vp);
error = bread(era->devvp,
fsbtodb(era->fs, ino_to_fsba(era->fs, ip->i_number)),
- (int)era->fs->e2fs_bsize, NOCRED, &bp);
+ (int)era->fs->e2fs_bsize, &bp);
if (error) {
vput(vp);
return (error);
@@ -412,7 +412,7 @@
size = DEV_BSIZE;
else
size = dpart.disklab->d_secsize;
- error = bread(devvp, (int32_t)(SBOFF / size), SBSIZE, NOCRED, &bp);
+ error = bread(devvp, (int32_t)(SBOFF / size), SBSIZE, &bp);
if (error) {
brelse(bp);
return (error);
@@ -450,7 +450,7 @@
for (i=0; i < fs->e2fs_ngdb; i++) {
error = bread(devvp ,
fsbtodb(fs, ((fs->e2fs_bsize>1024)? 0 : 1) + i + 1),
- fs->e2fs_bsize, NOCRED, &bp);
+ fs->e2fs_bsize, &bp);
if (error) {
brelse(bp);
return (error);
@@ -516,7 +516,7 @@
#ifdef DEBUG_EXT2
printf("ext2 sb size: %d\n", sizeof(struct ext2fs));
#endif
- error = bread(devvp, (SBOFF / DEV_BSIZE), SBSIZE, cred, &bp);
+ error = bread(devvp, (SBOFF / DEV_BSIZE), SBSIZE, &bp);
if (error)
goto out;
fs = (struct ext2fs *)bp->b_data;
@@ -564,7 +564,7 @@
for (i=0; i < m_fs->e2fs_ngdb; i++) {
error = bread(devvp ,
fsbtodb(m_fs, ((m_fs->e2fs_bsize>1024)? 0 : 1) + i + 1),
- m_fs->e2fs_bsize, NOCRED, &bp);
+ m_fs->e2fs_bsize, &bp);
if (error) {
free(m_fs->e2fs_gd, M_UFSMNT);
goto out;
@@ -862,7 +862,7 @@
/* Read in the disk contents for the inode, copy into the inode. */
error = bread(ump->um_devvp, fsbtodb(fs, ino_to_fsba(fs, ino)),
- (int)fs->e2fs_bsize, NOCRED, &bp);
+ (int)fs->e2fs_bsize, &bp);
if (error) {
/*
* The inode does not contain anything useful, so it would
Index: ufs/ffs/ffs_alloc.c
===================================================================
RCS file: /cvs/src/sys/ufs/ffs/ffs_alloc.c,v
retrieving revision 1.90
diff -u -r1.90 ffs_alloc.c
--- ufs/ffs/ffs_alloc.c 3 Jul 2011 18:23:10 -0000 1.90
+++ ufs/ffs/ffs_alloc.c 3 Jul 2011 23:08:21 -0000
@@ -222,8 +222,7 @@
* Allocate the extra space in the buffer.
*/
if (bpp != NULL) {
- if ((error = bread(ITOV(ip), lbprev, fs->fs_bsize,
- NOCRED, &bp)) != 0)
+ if ((error = bread(ITOV(ip), lbprev, fs->fs_bsize, &bp)) != 0)
goto error;
bp->b_bcount = osize;
}
@@ -431,7 +430,7 @@
soff = start_lbn;
} else {
idp = &start_ap[start_lvl - 1];
- if (bread(vp, idp->in_lbn, (int)fs->fs_bsize, NOCRED, &sbp)) {
+ if (bread(vp, idp->in_lbn, (int)fs->fs_bsize, &sbp)) {
brelse(sbp);
return (ENOSPC);
}
@@ -454,7 +453,7 @@
panic("ffs1_reallocblk: start == end");
#endif
ssize = len - (idp->in_off + 1);
- if (bread(vp, idp->in_lbn, (int)fs->fs_bsize, NOCRED, &ebp))
+ if (bread(vp, idp->in_lbn, (int)fs->fs_bsize, &ebp))
goto fail;
ebap = (int32_t *)ebp->b_data;
}
@@ -640,7 +639,7 @@
soff = start_lbn;
} else {
idp = &start_ap[start_lvl - 1];
- if (bread(vp, idp->in_lbn, (int)fs->fs_bsize, NOCRED, &sbp)) {
+ if (bread(vp, idp->in_lbn, (int)fs->fs_bsize, &sbp)) {
brelse(sbp);
return (ENOSPC);
}
@@ -659,7 +658,7 @@
panic("ffs2_reallocblk: start == end");
#endif
ssize = len - (idp->in_off + 1);
- if (bread(vp, idp->in_lbn, (int)fs->fs_bsize, NOCRED, &ebp))
+ if (bread(vp, idp->in_lbn, (int)fs->fs_bsize, &ebp))
goto fail;
ebap = (daddr64_t *)ebp->b_data;
}
@@ -1190,7 +1189,7 @@
struct buf *bp;
if (bread(ip->i_devvp, fsbtodb(fs, cgtod(fs, cg)),
- (int)fs->fs_cgsize, NOCRED, &bp)) {
+ (int)fs->fs_cgsize, &bp)) {
brelse(bp);
return (NULL);
}
Index: ufs/ffs/ffs_balloc.c
===================================================================
RCS file: /cvs/src/sys/ufs/ffs/ffs_balloc.c,v
retrieving revision 1.36
diff -u -r1.36 ffs_balloc.c
--- ufs/ffs/ffs_balloc.c 5 Jan 2008 19:49:26 -0000 1.36
+++ ufs/ffs/ffs_balloc.c 3 Jul 2011 23:08:21 -0000
@@ -141,8 +141,7 @@
*/
if (bpp != NULL) {
- error = bread(vp, lbn, fs->fs_bsize, NOCRED,
- bpp);
+ error = bread(vp, lbn, fs->fs_bsize, bpp);
if (error) {
brelse(*bpp);
return (error);
@@ -164,7 +163,7 @@
*/
if (bpp != NULL) {
error = bread(vp, lbn, fs->fs_bsize,
- NOCRED, bpp);
+ bpp);
if (error) {
brelse(*bpp);
return (error);
@@ -272,8 +271,7 @@
* Fetch through the indirect blocks, allocating as necessary.
*/
for (i = 1;;) {
- error = bread(vp,
- indirs[i].in_lbn, (int)fs->fs_bsize, NOCRED, &bp);
+ error = bread(vp, indirs[i].in_lbn, (int)fs->fs_bsize, &bp);
if (error) {
brelse(bp);
goto fail;
@@ -366,7 +364,7 @@
brelse(bp);
if (bpp != NULL) {
if (flags & B_CLRBUF) {
- error = bread(vp, lbn, (int)fs->fs_bsize, NOCRED, &nbp);
+ error = bread(vp, lbn, (int)fs->fs_bsize, &nbp);
if (error) {
brelse(nbp);
goto fail;
@@ -406,8 +404,7 @@
} else if (unwindidx >= 0) {
int r;
- r = bread(vp, indirs[unwindidx].in_lbn,
- (int)fs->fs_bsize, NOCRED, &bp);
+ r = bread(vp, indirs[unwindidx].in_lbn, (int)fs->fs_bsize, &bp);
if (r)
panic("Could not unwind indirect block, error %d", r);
bap = (int32_t *)bp->b_data;
@@ -512,8 +509,7 @@
* block. Just read it, if requested.
*/
if (bpp != NULL) {
- error = bread(vp, lbn, fs->fs_bsize, NOCRED,
- bpp);
+ error = bread(vp, lbn, fs->fs_bsize, bpp);
if (error) {
brelse(*bpp);
return (error);
@@ -537,7 +533,7 @@
*/
if (bpp != NULL) {
error = bread(vp, lbn, fs->fs_bsize,
- NOCRED, bpp);
+ bpp);
if (error) {
brelse(*bpp);
return (error);
@@ -657,8 +653,7 @@
* Fetch through the indirect blocks, allocating as necessary.
*/
for (i = 1;;) {
- error = bread(vp, indirs[i].in_lbn, (int) fs->fs_bsize,
- NOCRED, &bp);
+ error = bread(vp, indirs[i].in_lbn, (int)fs->fs_bsize, &bp);
if (error) {
brelse(bp);
goto fail;
@@ -773,7 +768,7 @@
if (bpp != NULL) {
if (flags & B_CLRBUF) {
- error = bread(vp, lbn, (int)fs->fs_bsize, NOCRED, &nbp);
+ error = bread(vp, lbn, (int)fs->fs_bsize, &nbp);
if (error) {
brelse(nbp);
goto fail;
@@ -854,7 +849,7 @@
ffs_update(ip, NULL, NULL, MNT_WAIT);
} else {
r = bread(vp, indirs[unwindidx].in_lbn,
- (int) fs->fs_bsize, NOCRED, &bp);
+ (int)fs->fs_bsize, &bp);
if (r)
panic("ffs2_balloc: unwind failed");
Index: ufs/ffs/ffs_inode.c
===================================================================
RCS file: /cvs/src/sys/ufs/ffs/ffs_inode.c,v
retrieving revision 1.57
diff -u -r1.57 ffs_inode.c
--- ufs/ffs/ffs_inode.c 12 Apr 2011 19:45:43 -0000 1.57
+++ ufs/ffs/ffs_inode.c 3 Jul 2011 23:08:21 -0000
@@ -117,7 +117,7 @@
}
error = bread(ip->i_devvp, fsbtodb(fs, ino_to_fsba(fs, ip->i_number)),
- (int)fs->fs_bsize, NOCRED, &bp);
+ (int)fs->fs_bsize, &bp);
if (error) {
brelse(bp);
return (error);
Index: ufs/ffs/ffs_softdep.c
===================================================================
RCS file: /cvs/src/sys/ufs/ffs/ffs_softdep.c,v
retrieving revision 1.105
diff -u -r1.105 ffs_softdep.c
--- ufs/ffs/ffs_softdep.c 3 Jul 2011 18:23:10 -0000 1.105
+++ ufs/ffs/ffs_softdep.c 3 Jul 2011 23:08:22 -0000
@@ -1221,7 +1221,7 @@
bzero(&cstotal, sizeof cstotal);
for (cyl = 0; cyl < fs->fs_ncg; cyl++) {
if ((error = bread(devvp, fsbtodb(fs, cgtod(fs, cyl)),
- fs->fs_cgsize, cred, &bp)) != 0) {
+ fs->fs_cgsize, &bp)) != 0) {
brelse(bp);
return (error);
}
@@ -1920,7 +1920,7 @@
*/
if ((error = bread(ip->i_devvp,
fsbtodb(fs, ino_to_fsba(fs, ip->i_number)),
- (int)fs->fs_bsize, NOCRED, &bp)) != 0)
+ (int)fs->fs_bsize, &bp)) != 0)
softdep_error("softdep_setup_freeblocks", error);
if (ip->i_ump->um_fstype == UM_UFS1)
@@ -2454,7 +2454,7 @@
FREE_LOCK(&lk);
} else {
FREE_LOCK(&lk);
- error = bread(ip->i_devvp, dbn, (int)fs->fs_bsize, NOCRED, &bp);
+ error = bread(ip->i_devvp, dbn, (int)fs->fs_bsize, &bp);
if (error)
return (error);
}
@@ -4587,7 +4587,7 @@
/*
* Flush directory page containing the inode's name.
*/
- error = bread(pvp, lbn, fs->fs_bsize, p->p_ucred, &bp);
+ error = bread(pvp, lbn, fs->fs_bsize, &bp);
if (error == 0) {
bp->b_bcount = blksize(fs, pip, lbn);
error = bwrite(bp);
@@ -5139,7 +5139,7 @@
FREE_LOCK(&lk);
if ((error = bread(ump->um_devvp,
fsbtodb(ump->um_fs, ino_to_fsba(ump->um_fs, inum)),
- (int)ump->um_fs->fs_bsize, NOCRED, &bp)) != 0) {
+ (int)ump->um_fs->fs_bsize, &bp)) != 0) {
brelse(bp);
break;
}
Index: ufs/ffs/ffs_subr.c
===================================================================
RCS file: /cvs/src/sys/ufs/ffs/ffs_subr.c,v
retrieving revision 1.25
diff -u -r1.25 ffs_subr.c
--- ufs/ffs/ffs_subr.c 3 Jul 2011 18:23:10 -0000 1.25
+++ ufs/ffs/ffs_subr.c 3 Jul 2011 23:08:22 -0000
@@ -68,7 +68,7 @@
bsize = blksize(fs, ip, lbn);
*bpp = NULL;
- if ((error = bread(vp, lbn, fs->fs_bsize, NOCRED, &bp)) != 0) {
+ if ((error = bread(vp, lbn, fs->fs_bsize, &bp)) != 0) {
brelse(bp);
return (error);
}
Index: ufs/ffs/ffs_vfsops.c
===================================================================
RCS file: /cvs/src/sys/ufs/ffs/ffs_vfsops.c,v
retrieving revision 1.131
diff -u -r1.131 ffs_vfsops.c
--- ufs/ffs/ffs_vfsops.c 3 Jul 2011 18:23:10 -0000 1.131
+++ ufs/ffs/ffs_vfsops.c 3 Jul 2011 23:08:22 -0000
@@ -501,7 +501,7 @@
error = bread(fra->devvp,
fsbtodb(fra->fs, ino_to_fsba(fra->fs, ip->i_number)),
- (int)fra->fs->fs_bsize, NOCRED, &bp);
+ (int)fra->fs->fs_bsize, &bp);
if (error) {
brelse(bp);
vput(vp);
@@ -557,8 +557,7 @@
*/
fs = VFSTOUFS(mountp)->um_fs;
- error = bread(devvp, (daddr64_t)(fs->fs_sblockloc / DEV_BSIZE), SBSIZE,
- NOCRED, &bp);
+ error = bread(devvp, fs->fs_sblockloc / DEV_BSIZE, SBSIZE, &bp);
if (error) {
brelse(bp);
return (error);
@@ -595,8 +594,7 @@
size = fs->fs_bsize;
if (i + fs->fs_frag > blks)
size = (blks - i) * fs->fs_fsize;
- error = bread(devvp, fsbtodb(fs, fs->fs_csaddr + i), size,
- NOCRED, &bp);
+ error = bread(devvp, fsbtodb(fs, fs->fs_csaddr + i), size, &bp);
if (error) {
brelse(bp);
return (error);
@@ -714,7 +712,7 @@
bp = NULL;
}
- error = bread(devvp, sbtry[i] / DEV_BSIZE, SBSIZE, cred, &bp);
+ error = bread(devvp, sbtry[i] / DEV_BSIZE, SBSIZE, &bp);
if (error)
goto out;
@@ -817,8 +815,7 @@
size = fs->fs_bsize;
if (i + fs->fs_frag > blks)
size = (blks - i) * fs->fs_fsize;
- error = bread(devvp, fsbtodb(fs, fs->fs_csaddr + i), size,
- cred, &bp);
+ error = bread(devvp, fsbtodb(fs, fs->fs_csaddr + i), size, &bp);
if (error) {
free(fs->fs_csp, M_UFSMNT);
goto out;
@@ -1292,7 +1289,7 @@
/* Read in the disk contents for the inode, copy into the inode. */
error = bread(ump->um_devvp, fsbtodb(fs, ino_to_fsba(fs, ino)),
- (int)fs->fs_bsize, NOCRED, &bp);
+ (int)fs->fs_bsize, &bp);
if (error) {
/*
* The inode does not contain anything useful, so it would
Index: ufs/ffs/ffs_vnops.c
===================================================================
RCS file: /cvs/src/sys/ufs/ffs/ffs_vnops.c,v
retrieving revision 1.63
diff -u -r1.63 ffs_vnops.c
--- ufs/ffs/ffs_vnops.c 9 Jun 2011 23:31:32 -0000 1.63
+++ ufs/ffs/ffs_vnops.c 3 Jul 2011 23:08:22 -0000
@@ -245,11 +245,11 @@
xfersize = bytesinfile;
if (lblktosize(fs, nextlbn) >= DIP(ip, size))
- error = bread(vp, lbn, size, NOCRED, &bp);
+ error = bread(vp, lbn, size, &bp);
else if (lbn - 1 == ip->i_ci.ci_lastr) {
error = bread_cluster(vp, lbn, size, &bp);
} else
- error = bread(vp, lbn, size, NOCRED, &bp);
+ error = bread(vp, lbn, size, &bp);
if (error)
break;