Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Dec 2009 17:27:29 GMT
From:      Aditya Sarawgi <truncs@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 171385 for review
Message-ID:  <200912041727.nB4HRTZG061990@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/chv.cgi?CH=171385

Change 171385 by truncs@aditya on 2009/12/04 17:27:18

	Use EXT2_LOCK only once instead of using it twice.

Affected files ...

.. //depot/projects/soc2009/soc_ext2fs/src/sys/fs/ext2fs/ext2_balloc.c#11 edit

Differences ...

==== //depot/projects/soc2009/soc_ext2fs/src/sys/fs/ext2fs/ext2_balloc.c#11 (text+ko) ====

@@ -207,13 +207,10 @@
 			bqrelse(bp);
 			continue;
 		}
-		if (pref == 0) {
-			EXT2_LOCK(ump);
+		EXT2_LOCK(ump);
+		if (pref == 0)
 			pref = ext2_blkpref(ip, lbn, indirs[i].in_off, bap,
 						bp->b_lblkno);
-
-		} else
-			EXT2_LOCK(ump);
 		error =  ext2_alloc(ip, lbn, pref, (int)fs->e2fs_bsize, cred, &newb);
 		if(error) {
 			brelse(bp);
@@ -291,3 +288,4 @@
 	*bpp = nbp;
 	return (0);
 }
+



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