]> git.baikalelectronics.ru Git - kernel.git/commit
shmem_parse_options(): use a separate structure to keep the results
authorAl Viro <viro@zeniv.linux.org.uk>
Sun, 8 Sep 2019 22:49:18 +0000 (18:49 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Fri, 13 Sep 2019 00:59:14 +0000 (20:59 -0400)
commitce7f8836dfa022b2c30b980375bed66dafe13f74
tree92a93d2eb61ec9a634652786ccdf803ba36697d3
parent7c2f8d6bd1d92b0fa6ebad88ac5717fb6916c826
shmem_parse_options(): use a separate structure to keep the results

... and copy the data from it into sbinfo in the callers.
For use by remount we need to keep track whether there'd
been options setting max_inodes, max_blocks and huge resp.
and do the sanity checks (and copying) only if such options
had been seen.  uid/gid/mode is ignored by remount and
NULL mpol is already explicitly treated as "ignore it",
so we don't need to keep track of those.

Note: theoretically, mpol_parse_string() may return NULL
not in case of error (for default policy), so the assumption
that NULL mpol means "change nothing" is incorrect.  However,
that's the mainline behaviour and any changes belong in
a separate patch.  If we go for that, we'll need to keep
track of having encountered mpol= option too.

[changes in remount logics from Hugh Dickins folded]

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
mm/shmem.c