summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fs/namei.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/fs/namei.c b/fs/namei.c
index a3431639e166..9575d0039699 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1467,8 +1467,7 @@ last_component:
nd->last_type = type;
return 0;
}
- err = walk_component(nd, &next, &this, type,
- lookup_flags & LOOKUP_FOLLOW);
+ err = walk_component(nd, &next, &this, type, LOOKUP_FOLLOW);
if (err < 0)
return err;
if (err) {
@@ -1476,11 +1475,6 @@ last_component:
if (err)
return err;
}
- if (lookup_flags & LOOKUP_DIRECTORY) {
- err = -ENOTDIR;
- if (!nd->inode->i_op->lookup)
- break;
- }
return 0;
}
terminate_walk(nd);