From becca78a75878703a4bcd1c1d5b3c6879cdc6e84 Mon Sep 17 00:00:00 2001 From: Gavin Shan Date: Tue, 31 Jul 2012 16:46:06 -0700 Subject: [PATCH] --- yaml --- r: 320862 b: refs/heads/master c: c1c9518331969f97ea403bac66f0fd4a85d204d5 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/mm/sparse.c | 14 +------------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/[refs] b/[refs] index e0a8a113562a..85a25bbcb031 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: db36a46113e101a8aa2d6ede41e78f2eaabed3f1 +refs/heads/master: c1c9518331969f97ea403bac66f0fd4a85d204d5 diff --git a/trunk/mm/sparse.c b/trunk/mm/sparse.c index 42ca0ea9af1b..fac95f2888f2 100644 --- a/trunk/mm/sparse.c +++ b/trunk/mm/sparse.c @@ -77,7 +77,6 @@ static struct mem_section noinline __init_refok *sparse_index_alloc(int nid) static int __meminit sparse_index_init(unsigned long section_nr, int nid) { - static DEFINE_SPINLOCK(index_init_lock); unsigned long root = SECTION_NR_TO_ROOT(section_nr); struct mem_section *section; int ret = 0; @@ -88,20 +87,9 @@ static int __meminit sparse_index_init(unsigned long section_nr, int nid) section = sparse_index_alloc(nid); if (!section) return -ENOMEM; - /* - * This lock keeps two different sections from - * reallocating for the same index - */ - spin_lock(&index_init_lock); - - if (mem_section[root]) { - ret = -EEXIST; - goto out; - } mem_section[root] = section; -out: - spin_unlock(&index_init_lock); + return ret; } #else /* !SPARSEMEM_EXTREME */