OSDN Git Service

mnt: Factor out unhash_mnt from detach_mnt and umount_tree
authorEric W. Biederman <ebiederm@xmission.com>
Mon, 29 Dec 2014 19:03:41 +0000 (13:03 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 May 2015 20:03:51 +0000 (22:03 +0200)
commit92e35ac5954f9f7829ad88066930a4b2b58fe4dd
treee19e6d6836768a5facb218c48ae13d85b5cbebd1
parent928116b22b1eb446c59a0fb93857d7a6d80930af
mnt: Factor out unhash_mnt from detach_mnt and umount_tree

commit 7bdb11de8ee4f4ae195e2fa19efd304e0b36c63b upstream.

Create a function unhash_mnt that contains the common code between
detach_mnt and umount_tree, and use unhash_mnt in place of the common
code.  This add a unncessary list_del_init(mnt->mnt_child) into
umount_tree but given that mnt_child is already empty this extra
line is a noop.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/namespace.c