]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/2.6.27.46/tmpfs-handle-mpol_local-mount-option-properly.patch
4.9-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 2.6.27.46 / tmpfs-handle-mpol_local-mount-option-properly.patch
1 From 12821f5fb942e795f8009ece14bde868893bd811 Mon Sep 17 00:00:00 2001
2 From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
3 Date: Tue, 23 Mar 2010 13:35:31 -0700
4 Subject: tmpfs: handle MPOL_LOCAL mount option properly
5
6 From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
7
8 commit 12821f5fb942e795f8009ece14bde868893bd811 upstream.
9
10 commit 71fe804b6d5 (mempolicy: use struct mempolicy pointer in
11 shmem_sb_info) added mpol=local mount option. but its feature is broken
12 since it was born. because such code always return 1 (i.e. mount
13 failure).
14
15 This patch fixes it.
16
17 Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
18 Cc: Ravikiran Thirumalai <kiran@scalex86.org>
19 Cc: Christoph Lameter <cl@linux-foundation.org>
20 Cc: Mel Gorman <mel@csn.ul.ie>
21 Acked-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
22 Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk>
23 Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
24 Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
25 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
26
27 ---
28 mm/mempolicy.c | 1 +
29 1 file changed, 1 insertion(+)
30
31 --- a/mm/mempolicy.c
32 +++ b/mm/mempolicy.c
33 @@ -2048,6 +2048,7 @@ int mpol_parse_str(char *str, struct mem
34 if (nodelist)
35 goto out;
36 mode = MPOL_PREFERRED;
37 + err = 0;
38 break;
39 case MPOL_DEFAULT:
40 /*