]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - fs/namespace.c
Merge tag 'powerpc-5.2-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
[linux.git] / fs / namespace.c
index b26778bdc236e83595d6c2129d4f61ae45dbc0f2..7660c2749c96f075c721b701e0ee4839fe62cb82 100644 (file)
@@ -2105,6 +2105,7 @@ static int attach_recursive_mnt(struct mount *source_mnt,
                /* Notice when we are propagating across user namespaces */
                if (child->mnt_parent->mnt_ns->user_ns != user_ns)
                        lock_mnt_tree(child);
+               child->mnt.mnt_flags &= ~MNT_LOCKED;
                commit_tree(child);
        }
        put_mountpoint(smp);
@@ -3445,6 +3446,7 @@ SYSCALL_DEFINE3(fsmount, int, fs_fd, unsigned int, flags,
        ns->root = mnt;
        ns->mounts = 1;
        list_add(&mnt->mnt_list, &ns->list);
+       mntget(newmount.mnt);
 
        /* Attach to an apparent O_PATH fd with a note that we need to unmount
         * it, not just simply put it.