Commit 0e55a7cc authored by Dan Williams's avatar Dan Williams Committed by Al Viro

[RFC PATCH] touch_mnt_namespace when the mount flags change

Daemons that need to be launched while the rootfs is read-only can now
poll /proc/mounts to be notified when their O_RDWR requests may no
longer end in EROFS.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Neil Brown <neilb@suse.de>
Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
parent 91efc167
...@@ -1550,8 +1550,13 @@ static int do_remount(struct path *path, int flags, int mnt_flags, ...@@ -1550,8 +1550,13 @@ static int do_remount(struct path *path, int flags, int mnt_flags,
if (!err) if (!err)
path->mnt->mnt_flags = mnt_flags; path->mnt->mnt_flags = mnt_flags;
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);
spin_lock(&vfsmount_lock);
touch_mnt_namespace(path->mnt->mnt_ns);
spin_unlock(&vfsmount_lock);
}
return err; return err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment