path: root/fs/pnode.h
diff options
authorEric W. Biederman <>2015-01-05 13:38:04 -0600
committerEric W. Biederman <>2015-04-02 20:34:20 -0500
commit0c56fe31420ca599c90240315f7959bf1b4eb6ce (patch)
tree6b61d7457c3ee31429e70ede1ebabb07e2bbebbb /fs/pnode.h
parent5d88457eb5b86b475422dc882f089203faaeedb5 (diff)
mnt: Don't propagate unmounts to locked mounts
If the first mount in shared subtree is locked don't unmount the shared subtree. This is ensured by walking through the mounts parents before children and marking a mount as unmountable if it is not locked or it is locked but it's parent is marked. This allows recursive mount detach to propagate through a set of mounts when unmounting them would not reveal what is under any locked mount. Cc: Signed-off-by: "Eric W. Biederman" <>
Diffstat (limited to 'fs/pnode.h')
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/pnode.h b/fs/pnode.h
index af47d4bd7b31..0fcdbe7ca648 100644
--- a/fs/pnode.h
+++ b/fs/pnode.h
@@ -19,6 +19,7 @@
#define IS_MNT_MARKED(m) ((m)->mnt.mnt_flags & MNT_MARKED)
#define SET_MNT_MARK(m) ((m)->mnt.mnt_flags |= MNT_MARKED)
#define CLEAR_MNT_MARK(m) ((m)->mnt.mnt_flags &= ~MNT_MARKED)
+#define IS_MNT_LOCKED(m) ((m)->mnt.mnt_flags & MNT_LOCKED)
#define CL_EXPIRE 0x01
#define CL_SLAVE 0x02