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 /mm/swapfile.c | |
parent | 873f1eedc1b983d772283279192c4ca2f60e8482 (diff) |
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 'mm/swapfile.c')
-rw-r--r-- | mm/swapfile.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/swapfile.c b/mm/swapfile.c index 90d2ed591de9..71cd288b2001 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c | |||
@@ -1498,7 +1498,7 @@ SYSCALL_DEFINE1(swapoff, const char __user *, specialfile) | |||
1498 | if (IS_ERR(pathname)) | 1498 | if (IS_ERR(pathname)) |
1499 | goto out; | 1499 | goto out; |
1500 | 1500 | ||
1501 | victim = filp_open(pathname->name, O_RDWR|O_LARGEFILE, 0); | 1501 | victim = file_open_name(pathname, O_RDWR|O_LARGEFILE, 0); |
1502 | err = PTR_ERR(victim); | 1502 | err = PTR_ERR(victim); |
1503 | if (IS_ERR(victim)) | 1503 | if (IS_ERR(victim)) |
1504 | goto out; | 1504 | goto out; |
@@ -1966,7 +1966,7 @@ SYSCALL_DEFINE2(swapon, const char __user *, specialfile, int, swap_flags) | |||
1966 | name = NULL; | 1966 | name = NULL; |
1967 | goto bad_swap; | 1967 | goto bad_swap; |
1968 | } | 1968 | } |
1969 | swap_file = filp_open(name->name, O_RDWR|O_LARGEFILE, 0); | 1969 | swap_file = file_open_name(name, O_RDWR|O_LARGEFILE, 0); |
1970 | if (IS_ERR(swap_file)) { | 1970 | if (IS_ERR(swap_file)) { |
1971 | error = PTR_ERR(swap_file); | 1971 | error = PTR_ERR(swap_file); |
1972 | swap_file = NULL; | 1972 | swap_file = NULL; |