diff options
author | mckusick <mckusick@FreeBSD.org> | 2011-07-14 18:06:13 +0000 |
---|---|---|
committer | mckusick <mckusick@FreeBSD.org> | 2011-07-14 18:06:13 +0000 |
commit | ea2a83a8daa00350e502581002584808808991f3 (patch) | |
tree | 4f30987448b612eb97128dbd48116bea75761f32 /sys/ufs | |
parent | fd66b2cc6488459c63d9bee9f89b972b3eec5cfc (diff) | |
download | FreeBSD-src-ea2a83a8daa00350e502581002584808808991f3.zip FreeBSD-src-ea2a83a8daa00350e502581002584808808991f3.tar.gz |
Consistently check mount flag (MNTK_SUJ) rather than superblock
flag (FS_SUJ) when determining whether to do journaling-based
operations. The mount flag is set only when journaling is active
while the superblock flag is set to indicate that journaling is to
be used. For example, when the filesystem is mounted read-only, the
journaling may be present (FS_SUJ) but not active (MNTK_SUJ).
Inappropriate checking of the FS_SUJ flag was causing some
journaling actions to be attempted at inappropriate times.
Diffstat (limited to 'sys/ufs')
-rw-r--r-- | sys/ufs/ffs/ffs_softdep.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c index 5fa8e64..fccb296 100644 --- a/sys/ufs/ffs/ffs_softdep.c +++ b/sys/ufs/ffs/ffs_softdep.c @@ -5199,7 +5199,7 @@ newfreefrag(ip, blkno, size, lbn) freefrag->ff_blkno = blkno; freefrag->ff_fragsize = size; - if (fs->fs_flags & FS_SUJ) { + if ((ip->i_ump->um_mountp->mnt_kern_flag & MNTK_SUJ) != 0) { freefrag->ff_jdep = (struct worklist *) newjfreefrag(freefrag, ip, blkno, size, lbn); } else { @@ -8928,7 +8928,7 @@ softdep_setup_sbupdate(ump, fs, bp) struct sbdep *sbdep; struct worklist *wk; - if ((fs->fs_flags & FS_SUJ) == 0) + if ((ump->um_mountp->mnt_kern_flag & MNTK_SUJ) == 0) return; LIST_FOREACH(wk, &bp->b_dep, wk_list) if (wk->wk_type == D_SBDEP) |