patch-2.1.44 linux/mm/swapfile.c

Next file: linux/mm/vmalloc.c
Previous file: linux/mm/slab.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.43/linux/mm/swapfile.c linux/mm/swapfile.c
@@ -334,7 +334,7 @@
 	lock_kernel();
 	if (!suser())
 		goto out;
-	err = namei(NAM_FOLLOW_LINK, specialfile, &inode);
+	err = namei(specialfile, &inode);
 	if (err)
 		goto out;
 	prev = -1;
@@ -488,13 +488,10 @@
 	} else {
 		p->prio = --least_priority;
 	}
-	error = namei(NAM_FOLLOW_LINK, specialfile, &swap_inode);
+	error = namei(specialfile, &swap_inode);
 	if (error)
 		goto bad_swap_2;
 	p->swap_file = swap_inode;
-	error = -EBUSY;
-	if (atomic_read(&swap_inode->i_count) != 1)
-		goto bad_swap_2;
 	error = -EINVAL;
 
 	if (S_ISBLK(swap_inode->i_mode)) {

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov