cgroup: remove redundant variable in cgroup_mount()
authorZefan Li <lizefan@huawei.com>
Sat, 20 Sep 2014 06:49:10 +0000 (14:49 +0800)
committerTejun Heo <tj@kernel.org>
Sat, 20 Sep 2014 17:09:35 +0000 (13:09 -0400)
commit0c7bf3e8cab7900e17ce7f97104c39927d835469
treed2d21b9687e7ef63fe87f2bfc772367dfaa6f239
parent3e2cd91ab92665148616a80dc0745c499d2746a7
cgroup: remove redundant variable in cgroup_mount()

Both pinned_sb and new_sb indicate if a new superblock is needed,
so we can just remove new_sb.

Note now we must check if kernfs_tryget_sb() returns NULL, because
when it returns NULL, kernfs_mount() may still re-use an existing
superblock, which is just allocated by another concurent mount.

Suggested-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Zefan Li <lizefan@huawei.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/cgroup.c