mirror of
https://github.com/joel16/android_kernel_sony_msm8994.git
synced 2024-12-04 18:47:20 +00:00
[PATCH] revert "vfs: propagate mnt_flags into do_loopback/vfsmount"
Revert commit f6422f17d3
, due to
Valdis.Kletnieks@vt.edu wrote:
>
> There seems to have been a bug introduced in this changeset:
>
> Am running 2.6.17-rc3-mm1. When this changeset is applied, 'mount --bind'
> misbehaves:
>
> > # mkdir /foo
> > # mount -t tmpfs -o rw,nosuid,nodev,noexec,noatime,nodiratime none /foo
> > # mkdir /foo/bar
> > # mount --bind /foo/bar /foo
> > # tail -2 /proc/mounts
> > none /foo tmpfs rw,nosuid,nodev,noexec,noatime,nodiratime 0 0
> > none /foo tmpfs rw 0 0
>
> Reverting this changeset causes both mounts to have the same options.
>
> (Thanks to Stephen Smalley for tracking down the changeset...)
>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: <Valdis.Kletnieks@vt.edu>
Cc: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
be6e028b64
commit
eee391a66d
@ -899,13 +899,11 @@ static int do_change_type(struct nameidata *nd, int flag)
|
||||
/*
|
||||
* do loopback mount.
|
||||
*/
|
||||
static int do_loopback(struct nameidata *nd, char *old_name, unsigned long flags, int mnt_flags)
|
||||
static int do_loopback(struct nameidata *nd, char *old_name, int recurse)
|
||||
{
|
||||
struct nameidata old_nd;
|
||||
struct vfsmount *mnt = NULL;
|
||||
int recurse = flags & MS_REC;
|
||||
int err = mount_is_safe(nd);
|
||||
|
||||
if (err)
|
||||
return err;
|
||||
if (!old_name || !*old_name)
|
||||
@ -939,7 +937,6 @@ static int do_loopback(struct nameidata *nd, char *old_name, unsigned long flags
|
||||
spin_unlock(&vfsmount_lock);
|
||||
release_mounts(&umount_list);
|
||||
}
|
||||
mnt->mnt_flags = mnt_flags;
|
||||
|
||||
out:
|
||||
up_write(&namespace_sem);
|
||||
@ -1353,7 +1350,7 @@ long do_mount(char *dev_name, char *dir_name, char *type_page,
|
||||
retval = do_remount(&nd, flags & ~MS_REMOUNT, mnt_flags,
|
||||
data_page);
|
||||
else if (flags & MS_BIND)
|
||||
retval = do_loopback(&nd, dev_name, flags, mnt_flags);
|
||||
retval = do_loopback(&nd, dev_name, flags & MS_REC);
|
||||
else if (flags & (MS_SHARED | MS_PRIVATE | MS_SLAVE | MS_UNBINDABLE))
|
||||
retval = do_change_type(&nd, flags);
|
||||
else if (flags & MS_MOVE)
|
||||
|
Loading…
Reference in New Issue
Block a user