Skip to content

Commit

Permalink
[RFC PATCH] touch_mnt_namespace when the mount flags change
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Williams authored and Al Viro committed Oct 23, 2008
1 parent 91efc16 commit 0e55a7c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion fs/namespace.c
Original file line number Diff line number Diff line change
Expand Up @@ -1550,8 +1550,13 @@ static int do_remount(struct path *path, int flags, int mnt_flags,
if (!err)
path->mnt->mnt_flags = mnt_flags;
up_write(&sb->s_umount);
if (!err)
if (!err) {
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;
}

Expand Down

0 comments on commit 0e55a7c

Please sign in to comment.