aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-10-12 21:04:42 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-12 21:04:42 -0400
commit8418263e3547ed3816475e4c55a77004f0426ee6 (patch)
tree97c548b16e6753e1911870d824a07b7e726b6229 /mm
parentccff9b1db693062b0a9c9070f4304deb47ef215c (diff)
parentf81700bd831efcd12eb7f0e66b24b16c2ad00a32 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull third pile of VFS updates from Al Viro: "Stuff from Jeff Layton, mostly. Sanitizing interplay between audit and namei, removing a lot of insanity from audit_inode() mess and getting things ready for his ESTALE patchset." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: procfs: don't need a PATH_MAX allocation to hold a string representation of an int vfs: embed struct filename inside of names_cache allocation if possible audit: make audit_inode take struct filename vfs: make path_openat take a struct filename pointer vfs: turn do_path_lookup into wrapper around struct filename variant audit: allow audit code to satisfy getname requests from its names_list vfs: define struct filename and have getname() return it vfs: unexport getname and putname symbols acct: constify the name arg to acct_on vfs: allocate page instead of names_cache buffer in mount_block_root audit: overhaul __audit_inode_child to accomodate retrying audit: optimize audit_compare_dname_path audit: make audit_compare_dname_path use parent_len helper audit: remove dirlen argument to audit_compare_dname_path audit: set the name_len in audit_inode for parent lookups audit: add a new "type" field to audit_names struct audit: reverse arguments to audit_inode_child audit: no need to walk list in audit_inode if name is NULL audit: pass in dentry to audit_copy_inode wherever possible audit: remove unnecessary NULL ptr checks from do_path_lookup
Diffstat (limited to 'mm')
-rw-r--r--mm/swapfile.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/mm/swapfile.c b/mm/swapfile.c
index 14e254c768fc..71cd288b2001 100644
--- a/mm/swapfile.c
+++ b/mm/swapfile.c
@@ -1483,7 +1483,7 @@ SYSCALL_DEFINE1(swapoff, const char __user *, specialfile)
1483 struct file *swap_file, *victim; 1483 struct file *swap_file, *victim;
1484 struct address_space *mapping; 1484 struct address_space *mapping;
1485 struct inode *inode; 1485 struct inode *inode;
1486 char *pathname; 1486 struct filename *pathname;
1487 int oom_score_adj; 1487 int oom_score_adj;
1488 int i, type, prev; 1488 int i, type, prev;
1489 int err; 1489 int err;
@@ -1498,8 +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, O_RDWR|O_LARGEFILE, 0); 1501 victim = file_open_name(pathname, O_RDWR|O_LARGEFILE, 0);
1502 putname(pathname);
1503 err = PTR_ERR(victim); 1502 err = PTR_ERR(victim);
1504 if (IS_ERR(victim)) 1503 if (IS_ERR(victim))
1505 goto out; 1504 goto out;
@@ -1936,7 +1935,7 @@ static int setup_swap_map_and_extents(struct swap_info_struct *p,
1936SYSCALL_DEFINE2(swapon, const char __user *, specialfile, int, swap_flags) 1935SYSCALL_DEFINE2(swapon, const char __user *, specialfile, int, swap_flags)
1937{ 1936{
1938 struct swap_info_struct *p; 1937 struct swap_info_struct *p;
1939 char *name; 1938 struct filename *name;
1940 struct file *swap_file = NULL; 1939 struct file *swap_file = NULL;
1941 struct address_space *mapping; 1940 struct address_space *mapping;
1942 int i; 1941 int i;
@@ -1967,7 +1966,7 @@ SYSCALL_DEFINE2(swapon, const char __user *, specialfile, int, swap_flags)
1967 name = NULL; 1966 name = NULL;
1968 goto bad_swap; 1967 goto bad_swap;
1969 } 1968 }
1970 swap_file = filp_open(name, O_RDWR|O_LARGEFILE, 0); 1969 swap_file = file_open_name(name, O_RDWR|O_LARGEFILE, 0);
1971 if (IS_ERR(swap_file)) { 1970 if (IS_ERR(swap_file)) {
1972 error = PTR_ERR(swap_file); 1971 error = PTR_ERR(swap_file);
1973 swap_file = NULL; 1972 swap_file = NULL;
@@ -2053,7 +2052,7 @@ SYSCALL_DEFINE2(swapon, const char __user *, specialfile, int, swap_flags)
2053 2052
2054 printk(KERN_INFO "Adding %uk swap on %s. " 2053 printk(KERN_INFO "Adding %uk swap on %s. "
2055 "Priority:%d extents:%d across:%lluk %s%s%s\n", 2054 "Priority:%d extents:%d across:%lluk %s%s%s\n",
2056 p->pages<<(PAGE_SHIFT-10), name, p->prio, 2055 p->pages<<(PAGE_SHIFT-10), name->name, p->prio,
2057 nr_extents, (unsigned long long)span<<(PAGE_SHIFT-10), 2056 nr_extents, (unsigned long long)span<<(PAGE_SHIFT-10),
2058 (p->flags & SWP_SOLIDSTATE) ? "SS" : "", 2057 (p->flags & SWP_SOLIDSTATE) ? "SS" : "",
2059 (p->flags & SWP_DISCARDABLE) ? "D" : "", 2058 (p->flags & SWP_DISCARDABLE) ? "D" : "",