]> git.ipfire.org Git - people/ms/linux.git/blobdiff - kernel/acct.c
vfs: make path_openat take a struct filename pointer
[people/ms/linux.git] / kernel / acct.c
index 08354195eeccee94a5e7eea225fbe6a1e01ed3d9..051e071a06e7a745a96c2fac6317d330dc33da43 100644 (file)
@@ -193,7 +193,7 @@ static void acct_file_reopen(struct bsd_acct_struct *acct, struct file *file,
        }
 }
 
-static int acct_on(const char *name)
+static int acct_on(struct filename *pathname)
 {
        struct file *file;
        struct vfsmount *mnt;
@@ -201,7 +201,7 @@ static int acct_on(const char *name)
        struct bsd_acct_struct *acct = NULL;
 
        /* Difference from BSD - they don't do O_APPEND */
-       file = filp_open(name, O_WRONLY|O_APPEND|O_LARGEFILE, 0);
+       file = file_open_name(pathname, O_WRONLY|O_APPEND|O_LARGEFILE, 0);
        if (IS_ERR(file))
                return PTR_ERR(file);
 
@@ -263,7 +263,7 @@ SYSCALL_DEFINE1(acct, const char __user *, name)
                struct filename *tmp = getname(name);
                if (IS_ERR(tmp))
                        return (PTR_ERR(tmp));
-               error = acct_on(tmp->name);
+               error = acct_on(tmp);
                putname(tmp);
        } else {
                struct bsd_acct_struct *acct;