fold __dentry_open() into its sole caller
authorAl Viro <viro@zeniv.linux.org.uk>
Sun, 10 Jun 2012 18:24:38 +0000 (14:24 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Sat, 14 Jul 2012 12:33:52 +0000 (16:33 +0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/open.c

index 1241c597d317132c1f71ff62760bf406d2d2cc09..28fbacbd5e311166cff3c78240a20dc176ea9f26 100644 (file)
--- a/fs/open.c
+++ b/fs/open.c
@@ -752,26 +752,6 @@ cleanup_file:
        return error;
 }
 
-static struct file *__dentry_open(struct dentry *dentry, struct vfsmount *mnt,
-                               struct file *f,
-                               int (*open)(struct inode *, struct file *),
-                               const struct cred *cred)
-{
-       int error;
-       error = do_dentry_open(dentry, mnt, f, open, cred);
-       if (!error) {
-               error = open_check_o_direct(f);
-               if (error) {
-                       fput(f);
-                       f = ERR_PTR(error);
-               }
-       } else { 
-               put_filp(f);
-               f = ERR_PTR(error);
-       }
-       return f;
-}
-
 /**
  * finish_open - finish opening a file
  * @od: opaque open data
@@ -841,7 +821,18 @@ struct file *dentry_open(struct dentry *dentry, struct vfsmount *mnt, int flags,
        }
 
        f->f_flags = flags;
-       return __dentry_open(dentry, mnt, f, NULL, cred);
+       error = do_dentry_open(dentry, mnt, f, NULL, cred);
+       if (!error) {
+               error = open_check_o_direct(f);
+               if (error) {
+                       fput(f);
+                       f = ERR_PTR(error);
+               }
+       } else { 
+               put_filp(f);
+               f = ERR_PTR(error);
+       }
+       return f;
 }
 EXPORT_SYMBOL(dentry_open);