mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-08 15:04:45 +00:00
[PATCH] namei fixes (18/19)
Cosmetical cleanups - __follow_mount() calls in __link_path_walk() absorbed into do_lookup(). Obviously equivalent transformation. Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
58c465eba4
commit
634ee7017b
@ -682,6 +682,7 @@ static int do_lookup(struct nameidata *nd, struct qstr *name,
|
|||||||
done:
|
done:
|
||||||
path->mnt = mnt;
|
path->mnt = mnt;
|
||||||
path->dentry = dentry;
|
path->dentry = dentry;
|
||||||
|
__follow_mount(path);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
need_lookup:
|
need_lookup:
|
||||||
@ -789,8 +790,6 @@ static fastcall int __link_path_walk(const char * name, struct nameidata *nd)
|
|||||||
err = do_lookup(nd, &this, &next);
|
err = do_lookup(nd, &this, &next);
|
||||||
if (err)
|
if (err)
|
||||||
break;
|
break;
|
||||||
/* Check mountpoints.. */
|
|
||||||
__follow_mount(&next);
|
|
||||||
|
|
||||||
err = -ENOENT;
|
err = -ENOENT;
|
||||||
inode = next.dentry->d_inode;
|
inode = next.dentry->d_inode;
|
||||||
@ -850,7 +849,6 @@ static fastcall int __link_path_walk(const char * name, struct nameidata *nd)
|
|||||||
err = do_lookup(nd, &this, &next);
|
err = do_lookup(nd, &this, &next);
|
||||||
if (err)
|
if (err)
|
||||||
break;
|
break;
|
||||||
__follow_mount(&next);
|
|
||||||
inode = next.dentry->d_inode;
|
inode = next.dentry->d_inode;
|
||||||
if ((lookup_flags & LOOKUP_FOLLOW)
|
if ((lookup_flags & LOOKUP_FOLLOW)
|
||||||
&& inode && inode->i_op && inode->i_op->follow_link) {
|
&& inode && inode->i_op && inode->i_op->follow_link) {
|
||||||
|
Loading…
Reference in New Issue
Block a user