diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/namei.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/namei.c b/fs/namei.c index c6b996817bb3..a7e994bb78c2 100644 --- a/fs/namei.c +++ b/fs/namei.c | |||
@@ -2361,8 +2361,10 @@ static struct file *do_last(struct nameidata *nd, struct path *path, | |||
2361 | BUG_ON(nd->flags & LOOKUP_RCU); | 2361 | BUG_ON(nd->flags & LOOKUP_RCU); |
2362 | inode = path->dentry->d_inode; | 2362 | inode = path->dentry->d_inode; |
2363 | error = -ENOENT; | 2363 | error = -ENOENT; |
2364 | if (!inode) | 2364 | if (!inode) { |
2365 | goto exit_dput; | 2365 | path_to_nameidata(path, nd); |
2366 | goto exit; | ||
2367 | } | ||
2366 | 2368 | ||
2367 | if (should_follow_link(inode, !symlink_ok)) { | 2369 | if (should_follow_link(inode, !symlink_ok)) { |
2368 | if (nd->flags & LOOKUP_RCU) { | 2370 | if (nd->flags & LOOKUP_RCU) { |