diff options
author | Jeff Layton <jlayton@redhat.com> | 2012-10-10 16:43:10 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-10-12 20:15:09 -0400 |
commit | 669abf4e5539c8aa48bf28c965be05c0a7b58a27 (patch) | |
tree | 5b8e9e17c4f03ddd719c9c2089d829e2a040854a /kernel/acct.c | |
parent | 873f1eedc1b983d772283279192c4ca2f60e8482 (diff) | |
download | op-kernel-dev-669abf4e5539c8aa48bf28c965be05c0a7b58a27.zip op-kernel-dev-669abf4e5539c8aa48bf28c965be05c0a7b58a27.tar.gz |
vfs: make path_openat take a struct filename pointer
...and fix up the callers. For do_file_open_root, just declare a
struct filename on the stack and fill out the .name field. For
do_filp_open, make it also take a struct filename pointer, and fix up its
callers to call it appropriately.
For filp_open, add a variant that takes a struct filename pointer and turn
filp_open into a wrapper around it.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'kernel/acct.c')
-rw-r--r-- | kernel/acct.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/acct.c b/kernel/acct.c index 0835419..051e071 100644 --- a/kernel/acct.c +++ b/kernel/acct.c @@ -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; |