aboutsummaryrefslogtreecommitdiffstats
path: root/fs/namei.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/namei.c')
-rw-r--r--fs/namei.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/namei.c b/fs/namei.c
index fc858b1124c2..d0066e17d45d 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1650,13 +1650,16 @@ static int path_lookupat(int dfd, const char *name,
1650 err = -ECHILD; 1650 err = -ECHILD;
1651 } 1651 }
1652 1652
1653 if (!err) 1653 if (!err) {
1654 err = handle_reval_path(nd); 1654 err = handle_reval_path(nd);
1655 if (err)
1656 path_put(&nd->path);
1657 }
1655 1658
1656 if (!err && nd->flags & LOOKUP_DIRECTORY) { 1659 if (!err && nd->flags & LOOKUP_DIRECTORY) {
1657 if (!nd->inode->i_op->lookup) { 1660 if (!nd->inode->i_op->lookup) {
1658 path_put(&nd->path); 1661 path_put(&nd->path);
1659 return -ENOTDIR; 1662 err = -ENOTDIR;
1660 } 1663 }
1661 } 1664 }
1662 1665