Ian Kent b5b801779d autofs4: Add d_manage() dentry operation
This patch required a previous patch to add the ->d_automount()
dentry operation.

Add a function to use the newly defined ->d_manage() dentry operation
for blocking during mount and expire.

Whether the VFS calls the dentry operations d_automount() and d_manage()
is controled by the DMANAGED_AUTOMOUNT and DMANAGED_TRANSIT flags. autofs
uses the d_automount() operation to callback to user space to request
mount operations and the d_manage() operation to block walks into mounts
that are under construction or destruction.

In order to prevent these functions from being called unnecessarily the
DMANAGED_* flags are cleared for cases which would cause this. In the
common case the DMANAGED_AUTOMOUNT and DMANAGED_TRANSIT flags are both
set for dentrys waiting to be mounted. The DMANAGED_TRANSIT flag is
cleared upon successful mount request completion and set during expire
runs, both during the dentry expire check, and if selected for expire,
is left set until a subsequent successful mount request completes.

The exception to this is the so-called rootless multi-mount which has
no actual mount at its base. In this case the DMANAGED_AUTOMOUNT flag
is cleared upon successful mount request completion as well and set
again after a successful expire.

Signed-off-by: Ian Kent <raven@themaw.net>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2011-01-15 20:07:38 -05:00
..
2011-01-12 20:03:43 -05:00
2011-01-12 20:02:45 -05:00
2011-01-12 20:03:42 -05:00
2011-01-07 17:50:26 +11:00
2011-01-12 20:03:12 -05:00
2011-01-13 17:19:38 -08:00
2011-01-07 17:50:26 +11:00
2011-01-07 17:50:26 +11:00
2011-01-07 17:50:26 +11:00
2011-01-14 09:23:36 -08:00
2011-01-12 20:02:44 -05:00
2011-01-12 20:02:45 -05:00
2011-01-12 20:02:45 -05:00
2011-01-12 20:03:42 -05:00
2011-01-12 20:02:47 -05:00
2011-01-07 17:50:26 +11:00
2011-01-07 17:50:26 +11:00
2011-01-12 20:02:43 -05:00
2011-01-12 20:02:44 -05:00
2011-01-07 17:50:26 +11:00
2011-01-13 17:32:43 -08:00
2011-01-07 17:50:26 +11:00
2011-01-07 17:50:26 +11:00
2011-01-07 17:50:26 +11:00
2011-01-12 20:02:44 -05:00
2011-01-07 17:50:26 +11:00
2011-01-07 17:50:26 +11:00
2011-01-13 08:03:22 -08:00
2011-01-13 08:03:12 -08:00
2011-01-07 17:50:27 +11:00
2011-01-07 17:50:33 +11:00
2011-01-07 17:50:33 +11:00
2011-01-07 17:50:21 +11:00
2011-01-13 17:32:32 -08:00
2011-01-12 20:16:43 -05:00
2011-01-07 17:50:33 +11:00