]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/namespace.c
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
[karo-tx-linux.git] / fs / namespace.c
index b0b15cc2117cb17359f37f01392c893663f58309..8174c8ab5c70e71316403e2f879a51c77566e422 100644 (file)
@@ -1136,8 +1136,15 @@ SYSCALL_DEFINE2(umount, char __user *, name, int, flags)
 {
        struct path path;
        int retval;
+       int lookup_flags = 0;
 
-       retval = user_path(name, &path);
+       if (flags & ~(MNT_FORCE | MNT_DETACH | MNT_EXPIRE | UMOUNT_NOFOLLOW))
+               return -EINVAL;
+
+       if (!(flags & UMOUNT_NOFOLLOW))
+               lookup_flags |= LOOKUP_FOLLOW;
+
+       retval = user_path_at(AT_FDCWD, name, lookup_flags, &path);
        if (retval)
                goto out;
        retval = -EINVAL;
@@ -1701,7 +1708,7 @@ int do_add_mount(struct vfsmount *newmnt, struct path *path,
 {
        int err;
 
-       mnt_flags &= ~(MNT_SHARED | MNT_WRITE_HOLD);
+       mnt_flags &= ~(MNT_SHARED | MNT_WRITE_HOLD | MNT_INTERNAL);
 
        down_write(&namespace_sem);
        /* Something was mounted here while we slept */