summaryrefslogtreecommitdiffstats
path: root/sys/ufs/ffs/ffs_vfsops.c
diff options
context:
space:
mode:
authormckusick <mckusick@FreeBSD.org>2011-07-30 00:43:18 +0000
committermckusick <mckusick@FreeBSD.org>2011-07-30 00:43:18 +0000
commit7a7c3b6e78c347dbbc2ca8360853a5c0000d66af (patch)
treea6f176e9f360e6601aa3c623c7984db6df633c75 /sys/ufs/ffs/ffs_vfsops.c
parent9494715d4b3d5d10e2451c54bcb68a5f91c6e5f5 (diff)
downloadFreeBSD-src-7a7c3b6e78c347dbbc2ca8360853a5c0000d66af.zip
FreeBSD-src-7a7c3b6e78c347dbbc2ca8360853a5c0000d66af.tar.gz
Update to -r224294 to ensure that only one of MNT_SUJ or MNT_SOFTDEP
is set so that mount can revert back to using MNT_NOWAIT when doing getmntinfo. Approved by: re (kib)
Diffstat (limited to 'sys/ufs/ffs/ffs_vfsops.c')
-rw-r--r--sys/ufs/ffs/ffs_vfsops.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c
index 7f57c84..4f688a2 100644
--- a/sys/ufs/ffs/ffs_vfsops.c
+++ b/sys/ufs/ffs/ffs_vfsops.c
@@ -281,7 +281,7 @@ ffs_mount(struct mount *mp)
flags = WRITECLOSE;
if (mp->mnt_flag & MNT_FORCE)
flags |= FORCECLOSE;
- if (mp->mnt_flag & MNT_SOFTDEP) {
+ if (MOUNTEDSOFTDEP(mp)) {
error = softdep_flushfiles(mp, flags, td);
} else {
error = ffs_flushfiles(mp, flags, td);
@@ -307,7 +307,7 @@ ffs_mount(struct mount *mp)
vfs_write_resume(mp);
return (error);
}
- if (mp->mnt_flag & MNT_SOFTDEP)
+ if (MOUNTEDSOFTDEP(mp))
softdep_unmount(mp);
DROP_GIANT();
g_topology_lock();
@@ -411,7 +411,7 @@ ffs_mount(struct mount *mp)
* Softdep_mount() clears it in an initial mount
* or ro->rw remount.
*/
- if (mp->mnt_flag & MNT_SOFTDEP) {
+ if (MOUNTEDSOFTDEP(mp)) {
/* XXX: Reset too late ? */
MNT_ILOCK(mp);
mp->mnt_flag &= ~MNT_ASYNC;
@@ -443,7 +443,7 @@ ffs_mount(struct mount *mp)
fs->fs_fsmnt);
return (EINVAL);
}
- KASSERT((mp->mnt_flag & MNT_SOFTDEP) == 0,
+ KASSERT(MOUNTEDSOFTDEP(mp) == 0,
("soft updates enabled on read-only file system"));
DROP_GIANT();
g_topology_lock();
@@ -530,7 +530,7 @@ ffs_mount(struct mount *mp)
return (error);
}
if (fsckpid > 0) {
- KASSERT((mp->mnt_flag & MNT_SOFTDEP) == 0,
+ KASSERT(MOUNTEDSOFTDEP(mp) == 0,
("soft updates enabled on read-only file system"));
ump = VFSTOUFS(mp);
fs = ump->um_fs;
@@ -1247,7 +1247,7 @@ ffs_unmount(mp, mntflags)
vn_start_write(NULL, &mp, V_WAIT);
}
}
- if (mp->mnt_flag & MNT_SOFTDEP)
+ if (MOUNTEDSOFTDEP(mp))
error = softdep_flushfiles(mp, flags, td);
else
error = ffs_flushfiles(mp, flags, td);
@@ -1389,9 +1389,6 @@ ffs_statfs(mp, sbp)
fs = ump->um_fs;
if (fs->fs_magic != FS_UFS1_MAGIC && fs->fs_magic != FS_UFS2_MAGIC)
panic("ffs_statfs");
- /* Don't export MNT_SOFTDEP when MNT_SUJ is in use */
- if ((sbp->f_flags & (MNT_SOFTDEP | MNT_SUJ)) == (MNT_SOFTDEP | MNT_SUJ))
- sbp->f_flags &= ~MNT_SOFTDEP;
sbp->f_version = STATFS_VERSION;
sbp->f_bsize = fs->fs_fsize;
sbp->f_iosize = fs->fs_bsize;
OpenPOWER on IntegriCloud