diff options
author | Dan Williams <dan.j.williams@intel.com> | 2008-09-26 22:01:20 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2008-10-23 05:13:23 -0400 |
commit | 0e55a7cca4b66f625d67b292f80b6a976e77c51b (patch) | |
tree | 5106fdf23fe0a6030ab00645bf37f19f07aadd45 /fs | |
parent | 91efc167d02509ea78abeff6d668065964c67c0b (diff) |
[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: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/namespace.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/namespace.c b/fs/namespace.c index f527a0d6c64d..cce46702d33c 100644 --- a/fs/namespace.c +++ b/fs/namespace.c | |||
@@ -1550,8 +1550,13 @@ static int do_remount(struct path *path, int flags, int mnt_flags, | |||
1550 | if (!err) | 1550 | if (!err) |
1551 | path->mnt->mnt_flags = mnt_flags; | 1551 | path->mnt->mnt_flags = mnt_flags; |
1552 | up_write(&sb->s_umount); | 1552 | up_write(&sb->s_umount); |
1553 | if (!err) | 1553 | if (!err) { |
1554 | security_sb_post_remount(path->mnt, flags, data); | 1554 | security_sb_post_remount(path->mnt, flags, data); |
1555 | |||
1556 | spin_lock(&vfsmount_lock); | ||
1557 | touch_mnt_namespace(path->mnt->mnt_ns); | ||
1558 | spin_unlock(&vfsmount_lock); | ||
1559 | } | ||
1555 | return err; | 1560 | return err; |
1556 | } | 1561 | } |
1557 | 1562 | ||