msdosfs: Remove redundant brelse() after r294954
Same automation. No functional change.
This commit is contained in:
parent
235aa3446e
commit
56ad7abd9d
@ -202,7 +202,6 @@ pcbmap(struct denode *dep, u_long findcn, daddr_t *bnp, u_long *cnp, int *sp)
|
||||
brelse(bp);
|
||||
error = bread(pmp->pm_devvp, bn, bsize, NOCRED, &bp);
|
||||
if (error) {
|
||||
brelse(bp);
|
||||
return (error);
|
||||
}
|
||||
bp_bn = bn;
|
||||
@ -504,7 +503,6 @@ fatentry(int function, struct msdosfsmount *pmp, u_long cn, u_long *oldcontents,
|
||||
fatblock(pmp, byteoffset, &bn, &bsize, &bo);
|
||||
error = bread(pmp->pm_devvp, bn, bsize, NOCRED, &bp);
|
||||
if (error) {
|
||||
brelse(bp);
|
||||
return (error);
|
||||
}
|
||||
|
||||
@ -587,7 +585,6 @@ fatchain(struct msdosfsmount *pmp, u_long start, u_long count, u_long fillwith)
|
||||
fatblock(pmp, byteoffset, &bn, &bsize, &bo);
|
||||
error = bread(pmp->pm_devvp, bn, bsize, NOCRED, &bp);
|
||||
if (error) {
|
||||
brelse(bp);
|
||||
return (error);
|
||||
}
|
||||
while (count > 0) {
|
||||
@ -843,7 +840,6 @@ freeclusterchain(struct msdosfsmount *pmp, u_long cluster)
|
||||
updatefats(pmp, bp, lbn);
|
||||
error = bread(pmp->pm_devvp, bn, bsize, NOCRED, &bp);
|
||||
if (error) {
|
||||
brelse(bp);
|
||||
MSDOSFS_UNLOCK_MP(pmp);
|
||||
return (error);
|
||||
}
|
||||
|
@ -234,7 +234,6 @@ msdosfs_lookup_(struct vnode *vdp, struct vnode **vpp,
|
||||
}
|
||||
error = bread(pmp->pm_devvp, bn, blsize, NOCRED, &bp);
|
||||
if (error) {
|
||||
brelse(bp);
|
||||
return (error);
|
||||
}
|
||||
for (blkoff = 0; blkoff < blsize;
|
||||
@ -681,7 +680,6 @@ createde(struct denode *dep, struct denode *ddep, struct denode **depp,
|
||||
error = bread(pmp->pm_devvp, bn, blsize,
|
||||
NOCRED, &bp);
|
||||
if (error) {
|
||||
brelse(bp);
|
||||
return error;
|
||||
}
|
||||
ndep = bptoep(pmp, bp, ddep->de_fndoffset);
|
||||
@ -747,7 +745,6 @@ dosdirempty(struct denode *dep)
|
||||
}
|
||||
error = bread(pmp->pm_devvp, bn, blsize, NOCRED, &bp);
|
||||
if (error) {
|
||||
brelse(bp);
|
||||
return (0);
|
||||
}
|
||||
for (dentp = (struct direntry *)bp->b_data;
|
||||
@ -960,7 +957,6 @@ removede(struct denode *pdep, struct denode *dep)
|
||||
return error;
|
||||
error = bread(pmp->pm_devvp, bn, blsize, NOCRED, &bp);
|
||||
if (error) {
|
||||
brelse(bp);
|
||||
return error;
|
||||
}
|
||||
ep = bptoep(pmp, bp, offset);
|
||||
@ -1037,7 +1033,6 @@ uniqdosname(struct denode *dep, struct componentname *cnp, u_char *cp)
|
||||
}
|
||||
error = bread(pmp->pm_devvp, bn, blsize, NOCRED, &bp);
|
||||
if (error) {
|
||||
brelse(bp);
|
||||
return error;
|
||||
}
|
||||
for (dentp = (struct direntry *)bp->b_data;
|
||||
|
@ -862,7 +862,6 @@ msdosfs_fsiflush(struct msdosfsmount *pmp, int waitfor)
|
||||
error = bread(pmp->pm_devvp, pmp->pm_fsinfo, pmp->pm_BytesPerSec,
|
||||
NOCRED, &bp);
|
||||
if (error != 0) {
|
||||
brelse(bp);
|
||||
goto unlock;
|
||||
}
|
||||
fp = (struct fsinfo *)bp->b_data;
|
||||
|
@ -758,7 +758,6 @@ msdosfs_write(struct vop_write_args *ap)
|
||||
*/
|
||||
error = bread(thisvp, bn, pmp->pm_bpcluster, cred, &bp);
|
||||
if (error) {
|
||||
brelse(bp);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -1225,7 +1224,6 @@ abortit:
|
||||
NOCRED, &bp);
|
||||
if (error) {
|
||||
/* XXX should downgrade to ro here, fs is corrupt */
|
||||
brelse(bp);
|
||||
VOP_UNLOCK(fvp, 0);
|
||||
goto bad;
|
||||
}
|
||||
@ -1593,7 +1591,6 @@ msdosfs_readdir(struct vop_readdir_args *ap)
|
||||
break;
|
||||
error = bread(pmp->pm_devvp, bn, blsize, NOCRED, &bp);
|
||||
if (error) {
|
||||
brelse(bp);
|
||||
return (error);
|
||||
}
|
||||
n = min(n, blsize - bp->b_resid);
|
||||
|
Loading…
x
Reference in New Issue
Block a user