vfs: make path_openat take a struct filename pointer
[linux-block.git] / mm / swapfile.c
index 90d2ed591de90a0b9bad355864a054f210601241..71cd288b200179d4962222337f3947342fcebe57 100644 (file)
@@ -1498,7 +1498,7 @@ SYSCALL_DEFINE1(swapoff, const char __user *, specialfile)
        if (IS_ERR(pathname))
                goto out;
 
-       victim = filp_open(pathname->name, O_RDWR|O_LARGEFILE, 0);
+       victim = file_open_name(pathname, O_RDWR|O_LARGEFILE, 0);
        err = PTR_ERR(victim);
        if (IS_ERR(victim))
                goto out;
@@ -1966,7 +1966,7 @@ SYSCALL_DEFINE2(swapon, const char __user *, specialfile, int, swap_flags)
                name = NULL;
                goto bad_swap;
        }
-       swap_file = filp_open(name->name, O_RDWR|O_LARGEFILE, 0);
+       swap_file = file_open_name(name, O_RDWR|O_LARGEFILE, 0);
        if (IS_ERR(swap_file)) {
                error = PTR_ERR(swap_file);
                swap_file = NULL;