diff options
author | Miklos Szeredi <mszeredi@suse.cz> | 2012-05-21 17:30:10 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-06-01 12:11:58 -0400 |
commit | 54c33e7f95284539e52ec2d99dcdf6efd29b247f (patch) | |
tree | 777bbd294473b78538ba5ad3151c6e2596c94eee /fs/namei.c | |
parent | d45ea86792db9679ed010b2c3df3db32b2ce5bde (diff) | |
download | talos-obmc-linux-54c33e7f95284539e52ec2d99dcdf6efd29b247f.tar.gz talos-obmc-linux-54c33e7f95284539e52ec2d99dcdf6efd29b247f.zip |
vfs: do_last(): make ENOENT exit RCU safe
This will allow this code to be used in RCU mode.
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/namei.c')
-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, BUG_ON(nd->flags & LOOKUP_RCU); inode = path->dentry->d_inode; error = -ENOENT; - if (!inode) - goto exit_dput; + if (!inode) { + path_to_nameidata(path, nd); + goto exit; + } if (should_follow_link(inode, !symlink_ok)) { if (nd->flags & LOOKUP_RCU) { |