Date: Thu, 5 Sep 2019 21:30:53 +0000 (UTC) From: Conrad Meyer <cem@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r351898 - head/sys/fs/msdosfs Message-ID: <201909052130.x85LUrR3073216@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: cem Date: Thu Sep 5 21:30:52 2019 New Revision: 351898 URL: https://svnweb.freebsd.org/changeset/base/351898 Log: 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) Modified: head/sys/fs/msdosfs/msdosfs_fat.c Modified: head/sys/fs/msdosfs/msdosfs_fat.c ============================================================================== --- head/sys/fs/msdosfs/msdosfs_fat.c Thu Sep 5 20:51:41 2019 (r351897) +++ head/sys/fs/msdosfs/msdosfs_fat.c Thu Sep 5 21:30:52 2019 (r351898) @@ -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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201909052130.x85LUrR3073216>