diff options
author | Miklos Szeredi <mszeredi@suse.cz> | 2012-06-05 09:10:12 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-07-14 08:32:58 -0400 |
commit | 37d7fffc9cafe75ded8a840fa30ba625f99ed7ae (patch) | |
tree | 100cebbacea20ddef447ccb4485104ff87b37aeb | |
parent | 6d7b5aaed7d887b34f29f900244cdbd17a86637c (diff) |
vfs: do_last(): inline lookup_slow()
Copy lookup_slow() into do_last().
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | fs/namei.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/fs/namei.c b/fs/namei.c index 6135a14d5a84..68742e3cb98d 100644 --- a/fs/namei.c +++ b/fs/namei.c | |||
@@ -2254,9 +2254,22 @@ static struct file *do_last(struct nameidata *nd, struct path *path, | |||
2254 | if (error < 0) | 2254 | if (error < 0) |
2255 | goto exit; | 2255 | goto exit; |
2256 | 2256 | ||
2257 | error = lookup_slow(nd, &nd->last, path); | 2257 | BUG_ON(nd->inode != dir->d_inode); |
2258 | if (error < 0) | 2258 | |
2259 | mutex_lock(&dir->d_inode->i_mutex); | ||
2260 | dentry = __lookup_hash(&nd->last, dir, nd); | ||
2261 | mutex_unlock(&dir->d_inode->i_mutex); | ||
2262 | error = PTR_ERR(dentry); | ||
2263 | if (IS_ERR(dentry)) | ||
2259 | goto exit; | 2264 | goto exit; |
2265 | path->mnt = nd->path.mnt; | ||
2266 | path->dentry = dentry; | ||
2267 | error = follow_managed(path, nd->flags); | ||
2268 | if (unlikely(error < 0)) | ||
2269 | goto exit_dput; | ||
2270 | |||
2271 | if (error) | ||
2272 | nd->flags |= LOOKUP_JUMPED; | ||
2260 | 2273 | ||
2261 | inode = path->dentry->d_inode; | 2274 | inode = path->dentry->d_inode; |
2262 | } | 2275 | } |