]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - fs/namei.c
vfs: make sure we don't have a stale root path if unlazy_walk() fails
[karo-tx-linux.git] / fs / namei.c
index 56e4f4d537d0589912bea3ee629390e894842336..5e6aaadc1dcd994df52a7fcfdc322d0f508cba6f 100644 (file)
@@ -574,9 +574,12 @@ unlock_and_drop_dentry:
 drop_dentry:
        unlock_rcu_walk();
        dput(dentry);
-       return -ECHILD;
+       goto drop_root_mnt;
 out:
        unlock_rcu_walk();
+drop_root_mnt:
+       if (!(nd->flags & LOOKUP_ROOT))
+               nd->root.mnt = NULL;
        return -ECHILD;
 }