mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-06 14:31:46 +00:00
mnt: Move the clear of MNT_LOCKED from copy_tree to it's callers.
Clear MNT_LOCKED in the callers of copy_tree except copy_mnt_ns, and collect_mounts. In copy_mnt_ns it is necessary to create an exact copy of a mount tree, so not clearing MNT_LOCKED is important. Similarly collect_mounts is used to take a snapshot of the mount tree for audit logging purposes and auditing using a faithful copy of the tree is important. This becomes particularly significant when we start setting MNT_LOCKED on rootfs to prevent it from being unmounted. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
This commit is contained in:
parent
da362b09e4
commit
8486a7882b
2 changed files with 1 additions and 1 deletions
|
@ -1613,7 +1613,6 @@ struct mount *copy_tree(struct mount *mnt, struct dentry *dentry,
|
|||
if (IS_ERR(q))
|
||||
return q;
|
||||
|
||||
q->mnt.mnt_flags &= ~MNT_LOCKED;
|
||||
q->mnt_mountpoint = mnt->mnt_mountpoint;
|
||||
|
||||
p = mnt;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue