- swapoff-atomic_inc_not_zero-on-mm_users.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     swapoff: use atomic_inc_not_zero() on mm_users

has been removed from the -mm tree.  Its filename is

     swapoff-atomic_inc_not_zero-on-mm_users.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
Subject: swapoff: use atomic_inc_not_zero() on mm_users
From: Hugh Dickins <hugh@xxxxxxxxxxx>


Now that we have atomic_inc_not_zero, it's more elegant for try_to_unuse to
use that on mm_users: doesn't actually matter at present, but safer to be
sure that once mm_users has gone to 0, nothing raises it for an instant.

Signed-off-by: Hugh Dickins <hugh@xxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 mm/swapfile.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff -puN mm/swapfile.c~swapoff-atomic_inc_not_zero-on-mm_users mm/swapfile.c
--- a/mm/swapfile.c~swapoff-atomic_inc_not_zero-on-mm_users
+++ a/mm/swapfile.c
@@ -772,10 +772,8 @@ static int try_to_unuse(unsigned int typ
 			while (*swap_map > 1 && !retval &&
 					(p = p->next) != &start_mm->mmlist) {
 				mm = list_entry(p, struct mm_struct, mmlist);
-				if (atomic_inc_return(&mm->mm_users) == 1) {
-					atomic_dec(&mm->mm_users);
+				if (!atomic_inc_not_zero(&mm->mm_users))
 					continue;
-				}
 				spin_unlock(&mmlist_lock);
 				mmput(prev_mm);
 				prev_mm = mm;
_

Patches currently in -mm which might be from hugh@xxxxxxxxxxx are

origin.patch
mm-vm_bug_on.patch
mm-remove-vm_locked-before-remap_pfn_range-and-drop-vm_shm.patch
page-migration-support-a-vma-migration-function.patch
allow-migration-of-mlocked-pages.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux