summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Kabaev <kan@FreeBSD.org>2004-03-16 22:06:32 +0000
committerAlexander Kabaev <kan@FreeBSD.org>2004-03-16 22:06:32 +0000
commitc355fd5a843dc0becb1816cbc468a35613a8efff (patch)
tree14c34425679168647e5bef6f4412f2629feb0432
parentf0f93429cfff16c9a06c162ae62d362ec20e050c (diff)
Notes
-rw-r--r--sys/ufs/ffs/ffs_alloc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/ufs/ffs/ffs_alloc.c b/sys/ufs/ffs/ffs_alloc.c
index 15b81dc6b42e..6d4e5929446f 100644
--- a/sys/ufs/ffs/ffs_alloc.c
+++ b/sys/ufs/ffs/ffs_alloc.c
@@ -1622,6 +1622,7 @@ gotit:
/*
* Check to see if we need to initialize more inodes.
*/
+ ibp = NULL;
if (fs->fs_magic == FS_UFS2_MAGIC &&
ipref + INOPB(fs) > cgp->cg_initediblk &&
cgp->cg_initediblk < cgp->cg_niblk) {
@@ -1634,12 +1635,13 @@ gotit:
dp2->di_gen = arc4random() / 2 + 1;
dp2++;
}
- bawrite(ibp);
cgp->cg_initediblk += INOPB(fs);
}
if (fs->fs_active != 0)
atomic_clear_int(&ACTIVECGNUM(fs, cg), ACTIVECGOFF(cg));
bdwrite(bp);
+ if (ibp != NULL)
+ bawrite(ibp);
return (cg * fs->fs_ipg + ipref);
}