summaryrefslogtreecommitdiffstats
path: root/sys/fs/unionfs
diff options
context:
space:
mode:
authormarkj <markj@FreeBSD.org>2015-06-06 16:36:13 +0000
committermarkj <markj@FreeBSD.org>2015-06-06 16:36:13 +0000
commit8563211efffbc521d0c933f9dd9a7869f67cf746 (patch)
tree5c78c9452f854306dfd0a26ba4b27dfc110e86a3 /sys/fs/unionfs
parent25f2105c703e99467184c8cd04761d8524a555e0 (diff)
downloadFreeBSD-src-8563211efffbc521d0c933f9dd9a7869f67cf746.zip
FreeBSD-src-8563211efffbc521d0c933f9dd9a7869f67cf746.tar.gz
unionfs: fix suspendability check bugs
- MNTK_SUSPENDABLE is set in mnt_kern_flag, not mnt_flag. - The lower layer of a unionfs mount is read-only, so the mount should be suspendable iff the upper layer is suspendable. - Remove a couple of superfluous comments. Differential Revision: https://reviews.freebsd.org/D2714 Reviewed by: kib, mjg
Diffstat (limited to 'sys/fs/unionfs')
-rw-r--r--sys/fs/unionfs/union_vfsops.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/sys/fs/unionfs/union_vfsops.c b/sys/fs/unionfs/union_vfsops.c
index e4b9fb5..f65ee8c 100644
--- a/sys/fs/unionfs/union_vfsops.c
+++ b/sys/fs/unionfs/union_vfsops.c
@@ -291,18 +291,11 @@ unionfs_domount(struct mount *mp)
}
MNT_ILOCK(mp);
- /*
- * Check mnt_flag
- */
if ((ump->um_lowervp->v_mount->mnt_flag & MNT_LOCAL) &&
(ump->um_uppervp->v_mount->mnt_flag & MNT_LOCAL))
mp->mnt_flag |= MNT_LOCAL;
- /*
- * Check mnt_kern_flag
- */
- if ((ump->um_lowervp->v_mount->mnt_flag & MNTK_SUSPENDABLE) ||
- (ump->um_uppervp->v_mount->mnt_flag & MNTK_SUSPENDABLE))
+ if ((ump->um_uppervp->v_mount->mnt_kern_flag & MNTK_SUSPENDABLE) != 0)
mp->mnt_kern_flag |= MNTK_SUSPENDABLE;
MNT_IUNLOCK(mp);
OpenPOWER on IntegriCloud