summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>2010-03-23 13:35:30 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2010-04-01 15:55:58 -0700
commit4fbd4ab7b17a71132fbf9a21ffeee6e1a25f070e (patch)
tree01af5aa72c7258a9b2e4690fb960cc9bde42b339
parentb221c4ef88aa82fdfcab9e98cca34a1173584bbf (diff)
downloadlinux-stable-4fbd4ab7b17a71132fbf9a21ffeee6e1a25f070e.tar.gz
linux-stable-4fbd4ab7b17a71132fbf9a21ffeee6e1a25f070e.tar.bz2
linux-stable-4fbd4ab7b17a71132fbf9a21ffeee6e1a25f070e.zip
tmpfs: mpol=bind:0 don't cause mount error.
commit d69b2e63e9172afb4d07c305601b79a55509ac4c upstream. Currently, following mount operation cause mount error. % mount -t tmpfs -ompol=bind:0 none /tmp Because commit 71fe804b6d5 (mempolicy: use struct mempolicy pointer in shmem_sb_info) corrupted MPOL_BIND parse code. This patch restore the needed one. Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Cc: Ravikiran Thirumalai <kiran@scalex86.org> Cc: Christoph Lameter <cl@linux-foundation.org> Cc: Mel Gorman <mel@csn.ul.ie> Acked-by: Lee Schermerhorn <lee.schermerhorn@hp.com> Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--mm/mempolicy.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/mm/mempolicy.c b/mm/mempolicy.c
index 13855e22aada..b2f22557b8ff 100644
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -2149,9 +2149,13 @@ int mpol_parse_str(char *str, struct mempolicy **mpol, int no_context)
if (!nodelist)
err = 0;
goto out;
- /*
- * case MPOL_BIND: mpol_new() enforces non-empty nodemask.
- */
+ case MPOL_BIND:
+ /*
+ * Insist on a nodelist
+ */
+ if (!nodelist)
+ goto out;
+ err = 0;
}
mode_flags = 0;