[patch 01/46] touch_mnt_namespace when the mount flags change
From: Greg KH
Date: Mon Nov 17 2008 - 02:21:15 EST
2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Dan Williams <dan.j.williams@xxxxxxxxx>
commit 0e55a7cca4b66f625d67b292f80b6a976e77c51b upstream
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@xxxxxxxx>
Cc: Neil Brown <neilb@xxxxxxx>
Signed-off-by: Dan Williams <dan.j.williams@xxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>
---
fs/namespace.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -1553,8 +1553,13 @@ static noinline int do_remount(struct na
if (!err)
nd->path.mnt->mnt_flags = mnt_flags;
up_write(&sb->s_umount);
- if (!err)
+ if (!err) {
security_sb_post_remount(nd->path.mnt, flags, data);
+
+ spin_lock(&vfsmount_lock);
+ touch_mnt_namespace(nd->path.mnt->mnt_ns);
+ spin_unlock(&vfsmount_lock);
+ }
return err;
}
--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/