diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2019-05-12 18:42:58 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2019-05-25 23:59:54 +0200 |
commit | f7a9945184100b531f0de3b12c617a349236dd8a (patch) | |
tree | be83490fcfad13c338adb4973a72ed923695f249 /fs/sysfs | |
parent | mount_pseudo(): drop 'name' argument, switch to d_make_root() (diff) | |
download | linux-f7a9945184100b531f0de3b12c617a349236dd8a.tar.xz linux-f7a9945184100b531f0de3b12c617a349236dd8a.zip |
no need to protect against put_user_ns(NULL)
it's a no-op
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/sysfs')
-rw-r--r-- | fs/sysfs/mount.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/sysfs/mount.c b/fs/sysfs/mount.c index 1b56686ab178..db81cfbab9d6 100644 --- a/fs/sysfs/mount.c +++ b/fs/sysfs/mount.c @@ -72,8 +72,7 @@ static int sysfs_init_fs_context(struct fs_context *fc) fc->fs_private = kfc; fc->ops = &sysfs_fs_context_ops; if (netns) { - if (fc->user_ns) - put_user_ns(fc->user_ns); + put_user_ns(fc->user_ns); fc->user_ns = get_user_ns(netns->user_ns); } fc->global = true; |