Commit 43fffc41 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] misc cleanup in symlink-handling part of namei.c

page_follow_link_light() should just call nd_set_link() - error handling will
come for free.
Signed-off-by: default avatarAl Viro <viro@parcelfarce.linux.org.uk>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent f1085b25
......@@ -945,8 +945,7 @@ int fastcall path_lookup(const char *name, unsigned int flags, struct nameidata
}
nd->mnt = mntget(current->fs->rootmnt);
nd->dentry = dget(current->fs->root);
}
else{
} else {
nd->mnt = mntget(current->fs->pwdmnt);
nd->dentry = dget(current->fs->pwd);
}
......@@ -2305,12 +2304,8 @@ int page_readlink(struct dentry *dentry, char __user *buffer, int buflen)
int page_follow_link_light(struct dentry *dentry, struct nameidata *nd)
{
struct page *page;
char *s = page_getlink(dentry, &page);
if (!IS_ERR(s)) {
nd_set_link(nd, s);
s = NULL;
}
return PTR_ERR(s);
nd_set_link(nd, page_getlink(dentry, &page));
return 0;
}
void page_put_link(struct dentry *dentry, struct nameidata *nd)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment