You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
mnt_flags fixes in do_remount()
* need vfsmount_lock over modifying it * need to preserve MNT_SHARED/MNT_UNBINDABLE Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
+5
-1
@@ -1536,8 +1536,12 @@ static int do_remount(struct path *path, int flags, int mnt_flags,
|
|||||||
err = change_mount_flags(path->mnt, flags);
|
err = change_mount_flags(path->mnt, flags);
|
||||||
else
|
else
|
||||||
err = do_remount_sb(sb, flags, data, 0);
|
err = do_remount_sb(sb, flags, data, 0);
|
||||||
if (!err)
|
if (!err) {
|
||||||
|
spin_lock(&vfsmount_lock);
|
||||||
|
mnt_flags |= path->mnt->mnt_flags & MNT_PNODE_MASK;
|
||||||
path->mnt->mnt_flags = mnt_flags;
|
path->mnt->mnt_flags = mnt_flags;
|
||||||
|
spin_unlock(&vfsmount_lock);
|
||||||
|
}
|
||||||
up_write(&sb->s_umount);
|
up_write(&sb->s_umount);
|
||||||
if (!err) {
|
if (!err) {
|
||||||
security_sb_post_remount(path->mnt, flags, data);
|
security_sb_post_remount(path->mnt, flags, data);
|
||||||
|
|||||||
Reference in New Issue
Block a user