]> git.baikalelectronics.ru Git - kernel.git/commit
make struct mountpoint bear the dentry reference to mountpoint, not struct mount
authorAl Viro <viro@zeniv.linux.org.uk>
Sun, 30 Jun 2019 14:39:08 +0000 (10:39 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Wed, 17 Jul 2019 02:43:40 +0000 (22:43 -0400)
commit163bd3b240e2638bc3b9a99fba5b2db7959fe638
treeefd25d386cbb1f6dcf85519f0ea318b7f2d04e87
parent5c2f3c27ec9eb2a2c2161c3bd0278c859ce1f3d5
make struct mountpoint bear the dentry reference to mountpoint, not struct mount

Using dput_to_list() to shift the contributing reference from ->mnt_mountpoint
to ->mnt_mp->m_dentry.  Dentries are dropped (with dput_to_list()) as soon
as struct mountpoint is destroyed; in cases where we are under namespace_sem
we use the global list, shrinking it in namespace_unlock().  In case of
detaching stuck MNT_LOCKed children at final mntput_no_expire() we use a local
list and shrink it ourselves.  ->mnt_ex_mountpoint crap is gone.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/mount.h
fs/namespace.c