All of lore.kernel.org
 help / color / mirror / Atom feed
* [merged] mempolicy-kill-do_set_mempolicy-down_writemm-mmap_sem.patch removed from -mm tree
@ 2014-10-13 18:20 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2014-10-13 18:20 UTC (permalink / raw)
  To: oleg, andi, ebiederm, gorcunov, hughd, kamezawa.hiroyu,
	kirill.shutemov, kosaki.motohiro, n-horiguchi, peterz, rientjes,
	viro, mm-commits


The patch titled
     Subject: mempolicy: kill do_set_mempolicy()->down_write(&mm->mmap_sem)
has been removed from the -mm tree.  Its filename was
     mempolicy-kill-do_set_mempolicy-down_writemm-mmap_sem.patch

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

------------------------------------------------------
From: Oleg Nesterov <oleg@redhat.com>
Subject: mempolicy: kill do_set_mempolicy()->down_write(&mm->mmap_sem)

Remove down_write(&mm->mmap_sem) in do_set_mempolicy(). This logic
was never correct and it is no longer needed, see the previous patch.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: David Rientjes <rientjes@google.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Hugh Dickins <hughd@google.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/mempolicy.c |   15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff -puN mm/mempolicy.c~mempolicy-kill-do_set_mempolicy-down_writemm-mmap_sem mm/mempolicy.c
--- a/mm/mempolicy.c~mempolicy-kill-do_set_mempolicy-down_writemm-mmap_sem
+++ a/mm/mempolicy.c
@@ -802,7 +802,6 @@ static long do_set_mempolicy(unsigned sh
 			     nodemask_t *nodes)
 {
 	struct mempolicy *new, *old;
-	struct mm_struct *mm = current->mm;
 	NODEMASK_SCRATCH(scratch);
 	int ret;
 
@@ -814,20 +813,11 @@ static long do_set_mempolicy(unsigned sh
 		ret = PTR_ERR(new);
 		goto out;
 	}
-	/*
-	 * prevent changing our mempolicy while show_numa_maps()
-	 * is using it.
-	 * Note:  do_set_mempolicy() can be called at init time
-	 * with no 'mm'.
-	 */
-	if (mm)
-		down_write(&mm->mmap_sem);
+
 	task_lock(current);
 	ret = mpol_set_nodemask(new, nodes, scratch);
 	if (ret) {
 		task_unlock(current);
-		if (mm)
-			up_write(&mm->mmap_sem);
 		mpol_put(new);
 		goto out;
 	}
@@ -837,9 +827,6 @@ static long do_set_mempolicy(unsigned sh
 	    nodes_weight(new->v.nodes))
 		current->il_next = first_node(new->v.nodes);
 	task_unlock(current);
-	if (mm)
-		up_write(&mm->mmap_sem);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-10-13 18:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-13 18:20 [merged] mempolicy-kill-do_set_mempolicy-down_writemm-mmap_sem.patch removed from -mm tree akpm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.