]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] get rid of __user_path_lookup_open
authorAl Viro <viro@zeniv.linux.org.uk>
Sat, 26 Jul 2008 07:33:14 +0000 (03:33 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Sun, 27 Jul 2008 00:53:41 +0000 (20:53 -0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/exec.c
fs/namei.c
include/linux/namei.h

index eca58c29eded6cd68d6d9a9205f04301fa33de6b..9696bbf0f0b1c1b1bd4578fdbfac331fa62ffc48 100644 (file)
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -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;
-
-       error = __user_path_lookup_open(library, LOOKUP_FOLLOW, &nd, FMODE_READ|FMODE_EXEC);
+       char *tmp = getname(library);
+       int error = PTR_ERR(tmp);
+
+       if (!IS_ERR(tmp)) {
+               error = path_lookup_open(AT_FDCWD, tmp,
+                                        LOOKUP_FOLLOW, &nd,
+                                        FMODE_READ|FMODE_EXEC);
+               putname(tmp);
+       }
        if (error)
                goto out;
 
index 38ceb6e06ebae1ff0709d7b25b333faab2109efb..a7b0a0b8012873dd1c8db6fe79c45b459096af41 100644 (file)
@@ -1193,19 +1193,6 @@ static int path_lookup_create(int dfd, const char *name,
                        nd, open_flags, create_mode);
 }
 
-int __user_path_lookup_open(const char __user *name, unsigned int lookup_flags,
-               struct nameidata *nd, int open_flags)
-{
-       char *tmp = getname(name);
-       int err = PTR_ERR(tmp);
-
-       if (!IS_ERR(tmp)) {
-               err = __path_lookup_intent_open(AT_FDCWD, tmp, lookup_flags, nd, open_flags, 0);
-               putname(tmp);
-       }
-       return err;
-}
-
 static struct dentry *__lookup_hash(struct qstr *name,
                struct dentry *base, struct nameidata *nd)
 {
index 00888ff69504aa98d7a6b31e779625113d38e3fa..68f8c3203c89d4d7c42404e4084051342206b875 100644 (file)
@@ -65,7 +65,6 @@ extern int path_lookup(const char *, unsigned, struct nameidata *);
 extern int vfs_path_lookup(struct dentry *, struct vfsmount *,
                           const char *, unsigned int, struct nameidata *);
 
-extern int __user_path_lookup_open(const char __user *, unsigned lookup_flags, struct nameidata *nd, int open_flags);
 extern int path_lookup_open(int dfd, const char *name, unsigned lookup_flags, struct nameidata *, int open_flags);
 extern struct file *lookup_instantiate_filp(struct nameidata *nd, struct dentry *dentry,
                int (*open)(struct inode *, struct file *));