]> Pileus Git - ~andy/linux/blobdiff - fs/namei.c
Merge branch 'for-38-rc2' of git://codeaurora.org/quic/kernel/davidb/linux-msm
[~andy/linux] / fs / namei.c
index b753192d8c3f15850abaab3cc36d52ff3cd59460..7d77f24d32a98a115e320605369006eeef30ae0d 100644 (file)
@@ -1272,8 +1272,10 @@ done:
        path->mnt = mnt;
        path->dentry = dentry;
        err = follow_managed(path, nd->flags);
-       if (unlikely(err < 0))
+       if (unlikely(err < 0)) {
+               path_put_conditional(path, nd);
                return err;
+       }
        *inode = path->dentry->d_inode;
        return 0;