[PATCH] get rid of __user_path_lookup_open

Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
Al Viro 2008-07-26 03:33:14 -04:00
commit 964bd18362
3 changed files with 10 additions and 18 deletions

View file

@ -106,11 +106,17 @@ static inline void put_binfmt(struct linux_binfmt * fmt)
*/
asmlinkage long sys_uselib(const char __user * library)
{
struct file * file;
struct file *file;
struct nameidata nd;
int error;
char *tmp = getname(library);
int error = PTR_ERR(tmp);
error = __user_path_lookup_open(library, LOOKUP_FOLLOW, &nd, FMODE_READ|FMODE_EXEC);
if (!IS_ERR(tmp)) {
error = path_lookup_open(AT_FDCWD, tmp,
LOOKUP_FOLLOW, &nd,
FMODE_READ|FMODE_EXEC);
putname(tmp);
}
if (error)
goto out;