aboutsummaryrefslogtreecommitdiff
path: root/sys/fs/ext2fs/ext2_balloc.c
diff options
context:
space:
mode:
authorConrad Meyer <cem@FreeBSD.org>2019-09-06 08:07:12 +0000
committerConrad Meyer <cem@FreeBSD.org>2019-09-06 08:07:12 +0000
commitfe8b34563d9e8bb98fc4fa68aa7742cc3f4388f1 (patch)
treecaca55c2f63aae8d7de36124953c5bfb95f35ad1 /sys/fs/ext2fs/ext2_balloc.c
parente0b5c15c549bf5546c4ad97d1d31295d63d18c3b (diff)
downloadsrc-fe8b34563d9e8bb98fc4fa68aa7742cc3f4388f1.tar.gz
src-fe8b34563d9e8bb98fc4fa68aa7742cc3f4388f1.zip
ext2fs: Remove redundant brelse() after r294954
Coccinelle: @ rule1 @ identifier __error; @@ ... int __error; ... @ rule2 depends on rule1 @ identifier rule1.__error; identifier __bp; @@ __error = ( bread | bread_gb | breadn | breadn_flags ) (..., &__bp); if ( ( __error | __error != 0 ) ) { ... - brelse(__bp); ... } No functional change.
Notes
Notes: svn path=/head/; revision=351926
Diffstat (limited to 'sys/fs/ext2fs/ext2_balloc.c')
-rw-r--r--sys/fs/ext2fs/ext2_balloc.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/sys/fs/ext2fs/ext2_balloc.c b/sys/fs/ext2fs/ext2_balloc.c
index 950419bc0507..db8f20eb6db0 100644
--- a/sys/fs/ext2fs/ext2_balloc.c
+++ b/sys/fs/ext2fs/ext2_balloc.c
@@ -78,7 +78,6 @@ ext2_ext_balloc(struct inode *ip, uint32_t lbn, int size,
} else {
error = bread(vp, lbn, fs->e2fs_bsize, NOCRED, &bp);
if (error) {
- brelse(bp);
return (error);
}
}
@@ -142,7 +141,6 @@ ext2_balloc(struct inode *ip, e2fs_lbn_t lbn, int size, struct ucred *cred,
if (nb != 0) {
error = bread(vp, lbn, fs->e2fs_bsize, NOCRED, &bp);
if (error) {
- brelse(bp);
return (error);
}
bp->b_blkno = fsbtodb(fs, nb);
@@ -219,7 +217,6 @@ ext2_balloc(struct inode *ip, e2fs_lbn_t lbn, int size, struct ucred *cred,
error = bread(vp,
indirs[i].in_lbn, (int)fs->e2fs_bsize, NOCRED, &bp);
if (error) {
- brelse(bp);
return (error);
}
bap = (e2fs_daddr_t *)bp->b_data;