]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit - fs/namespace.c
death to mnt_pinned
authorAl Viro <viro@zeniv.linux.org.uk>
Thu, 7 Aug 2014 13:12:31 +0000 (09:12 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 7 Aug 2014 18:40:09 +0000 (14:40 -0400)
commit3064c3563ba4c23e2c7a47254ec056ed9ba0098a
tree806bc1df85e925686cc1075b659a6d6fe3e14aec
parent8fa1f1c2bd86007beb4a4845e6087ac4a704dc80
death to mnt_pinned

Rather than playing silly buggers with vfsmount refcounts, just have
acct_on() ask fs/namespace.c for internal clone of file->f_path.mnt
and replace it with said clone.  Then attach the pin to original
vfsmount.  Voila - the clone will be alive until the file gets closed,
making sure that underlying superblock remains active, etc., and
we can drop the original vfsmount, so that it's not kept busy.
If the file lives until the final mntput of the original vfsmount,
we'll notice that there's an fs_pin (one in bsd_acct_struct that
holds that file) and mnt_pin_kill() will take it out.  Since
->kill() is synchronous, we won't proceed past that point until
these files are closed (and private clones of our vfsmount are
gone), so we get the same ordering warranties we used to get.

mnt_pin()/mnt_unpin()/->mnt_pinned is gone now, and good riddance -
it never became usable outside of kernel/acct.c (and racy wrt
umount even there).

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