Commit f6490b7f authored by Al Viro's avatar Al Viro

shmem_parse_options(): don't bother with mpol in separate variable

just use ctx->mpol (note that callers always set ctx->mpol to NULL when
calling that).
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 0b5071dd
...@@ -3366,7 +3366,6 @@ static const struct export_operations shmem_export_ops = { ...@@ -3366,7 +3366,6 @@ static const struct export_operations shmem_export_ops = {
static int shmem_parse_options(char *options, struct shmem_options *ctx) static int shmem_parse_options(char *options, struct shmem_options *ctx)
{ {
char *this_char, *value, *rest; char *this_char, *value, *rest;
struct mempolicy *mpol = NULL;
uid_t uid; uid_t uid;
gid_t gid; gid_t gid;
...@@ -3452,9 +3451,9 @@ static int shmem_parse_options(char *options, struct shmem_options *ctx) ...@@ -3452,9 +3451,9 @@ static int shmem_parse_options(char *options, struct shmem_options *ctx)
#endif #endif
#ifdef CONFIG_NUMA #ifdef CONFIG_NUMA
} else if (!strcmp(this_char,"mpol")) { } else if (!strcmp(this_char,"mpol")) {
mpol_put(mpol); mpol_put(ctx->mpol);
mpol = NULL; ctx->mpol = NULL;
if (mpol_parse_str(value, &mpol)) if (mpol_parse_str(value, &ctx->mpol))
goto bad_val; goto bad_val;
#endif #endif
} else { } else {
...@@ -3462,14 +3461,14 @@ static int shmem_parse_options(char *options, struct shmem_options *ctx) ...@@ -3462,14 +3461,14 @@ static int shmem_parse_options(char *options, struct shmem_options *ctx)
goto error; goto error;
} }
} }
ctx->mpol = mpol;
return 0; return 0;
bad_val: bad_val:
pr_err("tmpfs: Bad value '%s' for mount option '%s'\n", pr_err("tmpfs: Bad value '%s' for mount option '%s'\n",
value, this_char); value, this_char);
error: error:
mpol_put(mpol); mpol_put(ctx->mpol);
ctx->mpol = NULL;
return 1; return 1;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment