Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Sep 2019 08:08:10 +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: r351928 - head/sys/fs/msdosfs
Message-ID:  <201909060808.x8688A6F050934@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cem
Date: Fri Sep  6 08:08:10 2019
New Revision: 351928
URL: https://svnweb.freebsd.org/changeset/base/351928

Log:
  msdosfs: Remove redundant brelse() after r294954
  
  Same automation.
  
  No functional change.

Modified:
  head/sys/fs/msdosfs/msdosfs_fat.c
  head/sys/fs/msdosfs/msdosfs_lookup.c
  head/sys/fs/msdosfs/msdosfs_vfsops.c
  head/sys/fs/msdosfs/msdosfs_vnops.c

Modified: head/sys/fs/msdosfs/msdosfs_fat.c
==============================================================================
--- head/sys/fs/msdosfs/msdosfs_fat.c	Fri Sep  6 08:07:36 2019	(r351927)
+++ head/sys/fs/msdosfs/msdosfs_fat.c	Fri Sep  6 08:08:10 2019	(r351928)
@@ -202,7 +202,6 @@ pcbmap(struct denode *dep, u_long findcn, daddr_t *bnp
 				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_lon
 	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_lon
 		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 clus
 				updatefats(pmp, bp, lbn);
 			error = bread(pmp->pm_devvp, bn, bsize, NOCRED, &bp);
 			if (error) {
-				brelse(bp);
 				MSDOSFS_UNLOCK_MP(pmp);
 				return (error);
 			}

Modified: head/sys/fs/msdosfs/msdosfs_lookup.c
==============================================================================
--- head/sys/fs/msdosfs/msdosfs_lookup.c	Fri Sep  6 08:07:36 2019	(r351927)
+++ head/sys/fs/msdosfs/msdosfs_lookup.c	Fri Sep  6 08:08:10 2019	(r351928)
@@ -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, stru
 				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 *
 			}
 			error = bread(pmp->pm_devvp, bn, blsize, NOCRED, &bp);
 			if (error) {
-				brelse(bp);
 				return error;
 			}
 			for (dentp = (struct direntry *)bp->b_data;

Modified: head/sys/fs/msdosfs/msdosfs_vfsops.c
==============================================================================
--- head/sys/fs/msdosfs/msdosfs_vfsops.c	Fri Sep  6 08:07:36 2019	(r351927)
+++ head/sys/fs/msdosfs/msdosfs_vfsops.c	Fri Sep  6 08:08:10 2019	(r351928)
@@ -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;

Modified: head/sys/fs/msdosfs/msdosfs_vnops.c
==============================================================================
--- head/sys/fs/msdosfs/msdosfs_vnops.c	Fri Sep  6 08:07:36 2019	(r351927)
+++ head/sys/fs/msdosfs/msdosfs_vnops.c	Fri Sep  6 08:08:10 2019	(r351928)
@@ -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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201909060808.x8688A6F050934>