ufs: Remove redundant brelse() after r294954
Same automation. No functional change.
This commit is contained in:
parent
56ad7abd9d
commit
3a2c285092
@ -300,7 +300,6 @@ retry:
|
||||
*/
|
||||
error = bread_gb(vp, lbprev, osize, NOCRED, gbflags, &bp);
|
||||
if (error) {
|
||||
brelse(bp);
|
||||
return (error);
|
||||
}
|
||||
|
||||
|
@ -173,7 +173,6 @@ ffs_balloc_ufs1(struct vnode *vp, off_t startoffset, int size,
|
||||
if (nb != 0 && ip->i_size >= smalllblktosize(fs, lbn + 1)) {
|
||||
error = bread(vp, lbn, fs->fs_bsize, NOCRED, &bp);
|
||||
if (error) {
|
||||
brelse(bp);
|
||||
return (error);
|
||||
}
|
||||
bp->b_blkno = fsbtodb(fs, nb);
|
||||
@ -189,7 +188,6 @@ ffs_balloc_ufs1(struct vnode *vp, off_t startoffset, int size,
|
||||
if (nsize <= osize) {
|
||||
error = bread(vp, lbn, osize, NOCRED, &bp);
|
||||
if (error) {
|
||||
brelse(bp);
|
||||
return (error);
|
||||
}
|
||||
bp->b_blkno = fsbtodb(fs, nb);
|
||||
@ -292,7 +290,6 @@ retry:
|
||||
error = bread(vp,
|
||||
indirs[i].in_lbn, (int)fs->fs_bsize, NOCRED, &bp);
|
||||
if (error) {
|
||||
brelse(bp);
|
||||
goto fail;
|
||||
}
|
||||
bap = (ufs1_daddr_t *)bp->b_data;
|
||||
@ -665,7 +662,6 @@ ffs_balloc_ufs2(struct vnode *vp, off_t startoffset, int size,
|
||||
error = bread_gb(vp, -1 - lbn, fs->fs_bsize, NOCRED,
|
||||
gbflags, &bp);
|
||||
if (error) {
|
||||
brelse(bp);
|
||||
return (error);
|
||||
}
|
||||
bp->b_blkno = fsbtodb(fs, nb);
|
||||
@ -683,7 +679,6 @@ ffs_balloc_ufs2(struct vnode *vp, off_t startoffset, int size,
|
||||
error = bread_gb(vp, -1 - lbn, osize, NOCRED,
|
||||
gbflags, &bp);
|
||||
if (error) {
|
||||
brelse(bp);
|
||||
return (error);
|
||||
}
|
||||
bp->b_blkno = fsbtodb(fs, nb);
|
||||
@ -771,7 +766,6 @@ ffs_balloc_ufs2(struct vnode *vp, off_t startoffset, int size,
|
||||
error = bread_gb(vp, lbn, fs->fs_bsize, NOCRED,
|
||||
gbflags, &bp);
|
||||
if (error) {
|
||||
brelse(bp);
|
||||
return (error);
|
||||
}
|
||||
bp->b_blkno = fsbtodb(fs, nb);
|
||||
@ -788,7 +782,6 @@ ffs_balloc_ufs2(struct vnode *vp, off_t startoffset, int size,
|
||||
error = bread_gb(vp, lbn, osize, NOCRED,
|
||||
gbflags, &bp);
|
||||
if (error) {
|
||||
brelse(bp);
|
||||
return (error);
|
||||
}
|
||||
bp->b_blkno = fsbtodb(fs, nb);
|
||||
@ -892,7 +885,6 @@ retry:
|
||||
error = bread(vp,
|
||||
indirs[i].in_lbn, (int)fs->fs_bsize, NOCRED, &bp);
|
||||
if (error) {
|
||||
brelse(bp);
|
||||
goto fail;
|
||||
}
|
||||
bap = (ufs2_daddr_t *)bp->b_data;
|
||||
|
@ -789,7 +789,6 @@ out1:
|
||||
for (loc = 0; loc < len; loc++) {
|
||||
error = bread(vp, blkno + loc, fs->fs_bsize, KERNCRED, &nbp);
|
||||
if (error) {
|
||||
brelse(nbp);
|
||||
fs->fs_snapinum[snaploc] = 0;
|
||||
free(snapblklist, M_UFSMNT);
|
||||
goto done;
|
||||
|
@ -6698,7 +6698,6 @@ softdep_journal_freeblocks(ip, cred, length, flags)
|
||||
error = bread(ump->um_devvp, fsbtodb(fs, ino_to_fsba(fs, ip->i_number)),
|
||||
(int)fs->fs_bsize, cred, &bp);
|
||||
if (error) {
|
||||
brelse(bp);
|
||||
softdep_error("softdep_journal_freeblocks", error);
|
||||
return;
|
||||
}
|
||||
|
@ -102,7 +102,6 @@ ffs_blkatoff(struct vnode *vp, off_t offset, char **res, struct buf **bpp)
|
||||
*bpp = NULL;
|
||||
error = bread(vp, lbn, bsize, NOCRED, &bp);
|
||||
if (error) {
|
||||
brelse(bp);
|
||||
return (error);
|
||||
}
|
||||
if (res)
|
||||
|
@ -1767,7 +1767,6 @@ ffs_vgetf(mp, ino, flags, vpp, ffs_flags)
|
||||
* still zero, it will be unlinked and returned to the free
|
||||
* list by vput().
|
||||
*/
|
||||
brelse(bp);
|
||||
vput(vp);
|
||||
*vpp = NULL;
|
||||
return (error);
|
||||
|
Loading…
x
Reference in New Issue
Block a user