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
This commit is contained in:
parent
f3b55a98b5
commit
068a3d319a
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user