diff options
author | Eric W. Biederman | 2013-10-03 10:31:18 +0200 |
---|---|---|
committer | Al Viro | 2014-10-09 08:38:55 +0200 |
commit | 80b5dce8c59b0de1ed6e403b8298e02dcb4db64b (patch) | |
tree | 90b7a4f30c050d37f7ec436b63c8f9d7816199f0 /fs/dcache.c | |
parent | vfs: factor out lookup_mountpoint from new_mountpoint (diff) | |
download | kernel-qcow2-linux-80b5dce8c59b0de1ed6e403b8298e02dcb4db64b.tar.gz kernel-qcow2-linux-80b5dce8c59b0de1ed6e403b8298e02dcb4db64b.tar.xz kernel-qcow2-linux-80b5dce8c59b0de1ed6e403b8298e02dcb4db64b.zip |
vfs: Add a function to lazily unmount all mounts from any dentry.
The new function detach_mounts comes in two pieces. The first piece
is a static inline test of d_mounpoint that returns immediately
without taking any locks if d_mounpoint is not set. In the common
case when mountpoints are absent this allows the vfs to continue
running with it's same cacheline foot print.
The second piece of detach_mounts __detach_mounts actually does the
work and it assumes that a mountpoint is present so it is slow and
takes namespace_sem for write, and then locks the mount hash (aka
mount_lock) after a struct mountpoint has been found.
With those two locks held each entry on the list of mounts on a
mountpoint is selected and lazily unmounted until all of the mount
have been lazily unmounted.
v7: Wrote a proper change description and removed the changelog
documenting deleted wrong turns.
Signed-off-by: Eric W. Biederman <ebiederman@twitter.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/dcache.c')
0 files changed, 0 insertions, 0 deletions