diff options
author | Ingo Molnar <mingo@kernel.org> | 2012-12-08 09:25:06 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2012-12-08 09:25:06 -0500 |
commit | f0b9abfb044649bc452fb2fb975ff2fd599cc6a3 (patch) | |
tree | 7800081c5cb16a4dfee1e57a70f3be90f7b50d9a /mm/mempolicy.c | |
parent | adc1ef1e37358d3c17d1a74a58b2e104fc0bda15 (diff) | |
parent | 1b3c393cd43f22ead8a6a2f839efc6df8ebd7465 (diff) |
Merge branch 'linus' into perf/core
Conflicts:
tools/perf/Makefile
tools/perf/builtin-test.c
tools/perf/perf.h
tools/perf/tests/parse-events.c
tools/perf/util/evsel.h
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'mm/mempolicy.c')
-rw-r--r-- | mm/mempolicy.c | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/mm/mempolicy.c b/mm/mempolicy.c index d04a8a54c294..4ea600da8940 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c | |||
@@ -2037,28 +2037,6 @@ struct mempolicy *__mpol_dup(struct mempolicy *old) | |||
2037 | return new; | 2037 | return new; |
2038 | } | 2038 | } |
2039 | 2039 | ||
2040 | /* | ||
2041 | * If *frompol needs [has] an extra ref, copy *frompol to *tompol , | ||
2042 | * eliminate the * MPOL_F_* flags that require conditional ref and | ||
2043 | * [NOTE!!!] drop the extra ref. Not safe to reference *frompol directly | ||
2044 | * after return. Use the returned value. | ||
2045 | * | ||
2046 | * Allows use of a mempolicy for, e.g., multiple allocations with a single | ||
2047 | * policy lookup, even if the policy needs/has extra ref on lookup. | ||
2048 | * shmem_readahead needs this. | ||
2049 | */ | ||
2050 | struct mempolicy *__mpol_cond_copy(struct mempolicy *tompol, | ||
2051 | struct mempolicy *frompol) | ||
2052 | { | ||
2053 | if (!mpol_needs_cond_ref(frompol)) | ||
2054 | return frompol; | ||
2055 | |||
2056 | *tompol = *frompol; | ||
2057 | tompol->flags &= ~MPOL_F_SHARED; /* copy doesn't need unref */ | ||
2058 | __mpol_put(frompol); | ||
2059 | return tompol; | ||
2060 | } | ||
2061 | |||
2062 | /* Slow path of a mempolicy comparison */ | 2040 | /* Slow path of a mempolicy comparison */ |
2063 | bool __mpol_equal(struct mempolicy *a, struct mempolicy *b) | 2041 | bool __mpol_equal(struct mempolicy *a, struct mempolicy *b) |
2064 | { | 2042 | { |