diff options
author | Miklos Szeredi <mszeredi@suse.cz> | 2012-06-05 13:10:12 (GMT) |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-07-14 12:32:58 (GMT) |
commit | 37d7fffc9cafe75ded8a840fa30ba625f99ed7ae (patch) | |
tree | 100cebbacea20ddef447ccb4485104ff87b37aeb /fs | |
parent | 6d7b5aaed7d887b34f29f900244cdbd17a86637c (diff) | |
download | linux-fsl-qoriq-37d7fffc9cafe75ded8a840fa30ba625f99ed7ae.tar.xz |
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>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/namei.c | 17 |
1 files changed, 15 insertions, 2 deletions
@@ -2254,9 +2254,22 @@ static struct file *do_last(struct nameidata *nd, struct path *path, if (error < 0) goto exit; - error = lookup_slow(nd, &nd->last, path); - if (error < 0) + BUG_ON(nd->inode != dir->d_inode); + + mutex_lock(&dir->d_inode->i_mutex); + dentry = __lookup_hash(&nd->last, dir, nd); + mutex_unlock(&dir->d_inode->i_mutex); + error = PTR_ERR(dentry); + if (IS_ERR(dentry)) goto exit; + path->mnt = nd->path.mnt; + path->dentry = dentry; + error = follow_managed(path, nd->flags); + if (unlikely(error < 0)) + goto exit_dput; + + if (error) + nd->flags |= LOOKUP_JUMPED; inode = path->dentry->d_inode; } |