diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2019-05-12 13:18:42 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2019-05-25 17:59:55 -0400 |
commit | feb8ae43a7b33148028829b1b1691b28c874c952 (patch) | |
tree | 1670945a5204dba39d205c1c4c420025f159a035 /scripts/mod/empty.c | |
parent | f7a9945184100b531f0de3b12c617a349236dd8a (diff) | |
download | linux-stable-feb8ae43a7b33148028829b1b1691b28c874c952.tar.gz linux-stable-feb8ae43a7b33148028829b1b1691b28c874c952.tar.bz2 linux-stable-feb8ae43a7b33148028829b1b1691b28c874c952.zip |
start massaging the checks in sget_...(): move to sget_userns()
there are 3 remaining callers of sget_userns() - sget(), mount_ns()
and mount_pseudo_xattr(). Extra check in sget() is conditional
upon mount being neither KERNMOUNT nor SUBMOUNT, the identical one
in mount_ns() - upon being not KERNMOUNT; mount_pseudo_xattr()
has no such checks at all.
However, mount_ns() is never used with SUBMOUNT and mount_pseudo_xattr()
is used only for KERNMOUNT, so both would be fine with the same logics
as currently done in sget(), allowing to consolidate the entire thing
in sget_userns() itself.
That's not where these checks will end up in the long run, though -
the whole reason why they'd been done so deep in the bowels of
mount(2) was that there had been no way for a filesystem to specify
which userns to look at until it has entered ->mount().
Now there is a place where filesystem could override the defaults -
->init_fs_context(). Which allows to pull the checks out into
the callers of vfs_get_tree(). That'll take quite a bit of
massage, but that mess is possible to tease apart.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'scripts/mod/empty.c')
0 files changed, 0 insertions, 0 deletions