aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mm/swapfile.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/mm/swapfile.c b/mm/swapfile.c
index 915cb3fc43d7..c46c83d6aab0 100644
--- a/mm/swapfile.c
+++ b/mm/swapfile.c
@@ -92,7 +92,7 @@ static inline unsigned long scan_swap_map(struct swap_info_struct *si)
92 unsigned long offset, last_in_cluster; 92 unsigned long offset, last_in_cluster;
93 int latency_ration = LATENCY_LIMIT; 93 int latency_ration = LATENCY_LIMIT;
94 94
95 /* 95 /*
96 * We try to cluster swap pages by allocating them sequentially 96 * We try to cluster swap pages by allocating them sequentially
97 * in swap. Once we've allocated SWAPFILE_CLUSTER pages this 97 * in swap. Once we've allocated SWAPFILE_CLUSTER pages this
98 * way, however, we resort to first-free allocation, starting 98 * way, however, we resort to first-free allocation, starting
@@ -269,7 +269,7 @@ bad_nofile:
269 printk(KERN_ERR "swap_free: %s%08lx\n", Bad_file, entry.val); 269 printk(KERN_ERR "swap_free: %s%08lx\n", Bad_file, entry.val);
270out: 270out:
271 return NULL; 271 return NULL;
272} 272}
273 273
274static int swap_entry_free(struct swap_info_struct *p, unsigned long offset) 274static int swap_entry_free(struct swap_info_struct *p, unsigned long offset)
275{ 275{
@@ -736,10 +736,10 @@ static int try_to_unuse(unsigned int type)
736 break; 736 break;
737 } 737 }
738 738
739 /* 739 /*
740 * Get a page for the entry, using the existing swap 740 * Get a page for the entry, using the existing swap
741 * cache page if there is one. Otherwise, get a clean 741 * cache page if there is one. Otherwise, get a clean
742 * page and read the swap into it. 742 * page and read the swap into it.
743 */ 743 */
744 swap_map = &si->swap_map[i]; 744 swap_map = &si->swap_map[i];
745 entry = swp_entry(type, i); 745 entry = swp_entry(type, i);
@@ -1202,7 +1202,7 @@ asmlinkage long sys_swapoff(const char __user * specialfile)
1202 char * pathname; 1202 char * pathname;
1203 int i, type, prev; 1203 int i, type, prev;
1204 int err; 1204 int err;
1205 1205
1206 if (!capable(CAP_SYS_ADMIN)) 1206 if (!capable(CAP_SYS_ADMIN))
1207 return -EPERM; 1207 return -EPERM;
1208 1208
@@ -1395,12 +1395,12 @@ static int swap_show(struct seq_file *swap, void *v)
1395 file = ptr->swap_file; 1395 file = ptr->swap_file;
1396 len = seq_path(swap, &file->f_path, " \t\n\\"); 1396 len = seq_path(swap, &file->f_path, " \t\n\\");
1397 seq_printf(swap, "%*s%s\t%u\t%u\t%d\n", 1397 seq_printf(swap, "%*s%s\t%u\t%u\t%d\n",
1398 len < 40 ? 40 - len : 1, " ", 1398 len < 40 ? 40 - len : 1, " ",
1399 S_ISBLK(file->f_path.dentry->d_inode->i_mode) ? 1399 S_ISBLK(file->f_path.dentry->d_inode->i_mode) ?
1400 "partition" : "file\t", 1400 "partition" : "file\t",
1401 ptr->pages << (PAGE_SHIFT - 10), 1401 ptr->pages << (PAGE_SHIFT - 10),
1402 ptr->inuse_pages << (PAGE_SHIFT - 10), 1402 ptr->inuse_pages << (PAGE_SHIFT - 10),
1403 ptr->prio); 1403 ptr->prio);
1404 return 0; 1404 return 0;
1405} 1405}
1406 1406
@@ -1565,7 +1565,7 @@ asmlinkage long sys_swapon(const char __user * specialfile, int swap_flags)
1565 error = -EINVAL; 1565 error = -EINVAL;
1566 goto bad_swap; 1566 goto bad_swap;
1567 } 1567 }
1568 1568
1569 switch (swap_header_version) { 1569 switch (swap_header_version) {
1570 case 1: 1570 case 1:
1571 printk(KERN_ERR "version 0 swap is no longer supported. " 1571 printk(KERN_ERR "version 0 swap is no longer supported. "