]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/namei.c
fs: umount on symlink leaks mnt count
[karo-tx-linux.git] / fs / namei.c
index 985c6f3684859e17439d62c7d319611305414437..9eb787e5c167fb601845590f0181d249bf515fb0 100644 (file)
@@ -2256,9 +2256,10 @@ done:
                goto out;
        }
        path->dentry = dentry;
-       path->mnt = mntget(nd->path.mnt);
+       path->mnt = nd->path.mnt;
        if (should_follow_link(dentry, nd->flags & LOOKUP_FOLLOW))
                return 1;
+       mntget(path->mnt);
        follow_mount(path);
        error = 0;
 out: