summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Rice <Jim.Rice@Sun.COM>2009-11-11 09:51:53 +0000
committerJim Rice <Jim.Rice@Sun.COM>2009-11-11 09:51:53 +0000
commitb323a6159ab002be737b0f5f6a56ade96637e5bd (patch)
tree8c938f5ed3b43be1d071a8e39bf9ee6bd4a443cd
parent81fd181a33bee65d5be7a49c6093bb13b382b172 (diff)
downloadillumos-gate-b323a6159ab002be737b0f5f6a56ade96637e5bd.tar.gz
6890755 assertion failed: SEMA_HELD(&bp->b_sem), file: ../../common/os/bio.c
-rw-r--r--usr/src/uts/common/fs/ufs/ufs_alloc.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/usr/src/uts/common/fs/ufs/ufs_alloc.c b/usr/src/uts/common/fs/ufs/ufs_alloc.c
index b3cf0ae28f..d446ddc1e3 100644
--- a/usr/src/uts/common/fs/ufs/ufs_alloc.c
+++ b/usr/src/uts/common/fs/ufs/ufs_alloc.c
@@ -1985,9 +1985,12 @@ contigpref(ufsvfs_t *ufsvfsp, size_t nb, size_t minb)
/* find a free block */
for (; cgbno < cgblks; ++cgbno) {
if (isblock(fs, blksfree, cgbno)) {
- if (startcg != -1)
+ if (startcg != -1) {
+ brelse(bp);
+ savecg = startcg;
+ savebno = cgbno;
goto done;
- else
+ } else
break;
}
}
@@ -2011,11 +2014,6 @@ contigpref(ufsvfs_t *ufsvfsp, size_t nb, size_t minb)
}
done:
- if (startcg != -1) {
- brelse(bp);
- savecg = startcg;
- savebno = cgbno;
- }
/* convert block offset in cg to frag offset in cg */
savebno = blkstofrags(fs, savebno);