]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/namespace.c
mnt: Clear mnt_expire during pivot_root
[karo-tx-linux.git] / fs / namespace.c
index f87a90b98da2759a2014fc0eab3a51218cdb6e95..fe1c77145a78491b0dc124cdb7f4ca22d8eba275 100644 (file)
@@ -2967,6 +2967,8 @@ SYSCALL_DEFINE2(pivot_root, const char __user *, new_root,
        /* mount new_root on / */
        attach_mnt(new_mnt, real_mount(root_parent.mnt), root_mp);
        touch_mnt_namespace(current->nsproxy->mnt_ns);
+       /* A moved mount should not expire automatically */
+       list_del_init(&new_mnt->mnt_expire);
        unlock_mount_hash();
        chroot_fs_refs(&root, &new);
        put_mountpoint(root_mp);