diff options
author | Conrad Meyer <cem@FreeBSD.org> | 2019-09-05 21:30:52 +0000 |
---|---|---|
committer | Conrad Meyer <cem@FreeBSD.org> | 2019-09-05 21:30:52 +0000 |
commit | f80cbeb2920f21b73dce5e8b8874800d79354afd (patch) | |
tree | 67fea2dafcf8ec35d79f7512cf0b4a20881f0f3f /sys/fs/msdosfs | |
parent | ed4e4cff0e5c4b5dd5ee666faf1395390c7d6ede (diff) | |
download | src-f80cbeb2920f21b73dce5e8b8874800d79354afd.tar.gz src-f80cbeb2920f21b73dce5e8b8874800d79354afd.zip |
msdosfs: Drop an unneeded brelse in bread error condition
After r294954, it is an invariant that bread returns non-NULL bp if and only
if the routine succeeded. On error, it handles any buffer cleanup
internally. So the brelse(NULL) here was just redundant.
No functional change.
Discussed with: kib (extracted from a larger differential)
Notes
Notes:
svn path=/head/; revision=351898
Diffstat (limited to 'sys/fs/msdosfs')
-rw-r--r-- | sys/fs/msdosfs/msdosfs_fat.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/fs/msdosfs/msdosfs_fat.c b/sys/fs/msdosfs/msdosfs_fat.c index f50513979c59..b45f2df8909d 100644 --- a/sys/fs/msdosfs/msdosfs_fat.c +++ b/sys/fs/msdosfs/msdosfs_fat.c @@ -1145,10 +1145,8 @@ markvoldirty(struct msdosfsmount *pmp, int dirty) byteoffset = FATOFS(pmp, 1); fatblock(pmp, byteoffset, &bn, &bsize, &bo); error = bread(pmp->pm_devvp, bn, bsize, NOCRED, &bp); - if (error) { - brelse(bp); + if (error) return (error); - } /* * Get the current value of the FAT entry and set/clear the relevant |