diff options
author | David Howells <dhowells@redhat.com> | 2011-01-14 13:46:51 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2011-01-15 20:07:47 -0500 |
commit | ab90911ff90cdab59b31c045c3f0ae480d14f29d (patch) | |
tree | 683450a66eb9dc6bf053e38d63f4740bb53a7b6e /Documentation | |
parent | 87556ef19926e97464e0163a7840140527ae6615 (diff) |
Allow d_manage() to be used in RCU-walk mode
Allow d_manage() to be called from pathwalk when it is in RCU-walk mode as well
as when it is in Ref-walk mode. This permits __follow_mount_rcu() to call
d_manage() directly. d_manage() needs a parameter to indicate that it is in
RCU-walk mode as it isn't allowed to sleep if in that mode (but should return
-ECHILD instead).
autofs4_d_manage() can then be set to retain RCU-walk mode if the daemon
accesses it and otherwise request dropping back to ref-walk mode.
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/filesystems/Locking | 2 | ||||
-rw-r--r-- | Documentation/filesystems/vfs.txt | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking index cbf98b989b11..39707748ed2d 100644 --- a/Documentation/filesystems/Locking +++ b/Documentation/filesystems/Locking | |||
@@ -32,7 +32,7 @@ d_release: no no yes no | |||
32 | d_iput: no no yes no | 32 | d_iput: no no yes no |
33 | d_dname: no no no no | 33 | d_dname: no no no no |
34 | d_automount: no no yes no | 34 | d_automount: no no yes no |
35 | d_manage: no no yes no | 35 | d_manage: no no yes (ref-walk) maybe |
36 | 36 | ||
37 | --------------------------- inode_operations --------------------------- | 37 | --------------------------- inode_operations --------------------------- |
38 | prototypes: | 38 | prototypes: |
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt index 4682586b147a..3c4b2f1b64d0 100644 --- a/Documentation/filesystems/vfs.txt +++ b/Documentation/filesystems/vfs.txt | |||
@@ -865,7 +865,7 @@ struct dentry_operations { | |||
865 | void (*d_iput)(struct dentry *, struct inode *); | 865 | void (*d_iput)(struct dentry *, struct inode *); |
866 | char *(*d_dname)(struct dentry *, char *, int); | 866 | char *(*d_dname)(struct dentry *, char *, int); |
867 | struct vfsmount *(*d_automount)(struct path *); | 867 | struct vfsmount *(*d_automount)(struct path *); |
868 | int (*d_manage)(struct dentry *, bool); | 868 | int (*d_manage)(struct dentry *, bool, bool); |
869 | }; | 869 | }; |
870 | 870 | ||
871 | d_revalidate: called when the VFS needs to revalidate a dentry. This | 871 | d_revalidate: called when the VFS needs to revalidate a dentry. This |
@@ -960,6 +960,11 @@ struct dentry_operations { | |||
960 | held by the caller and the function should not initiate any mounts or | 960 | held by the caller and the function should not initiate any mounts or |
961 | unmounts that it will then wait for. | 961 | unmounts that it will then wait for. |
962 | 962 | ||
963 | If the 'rcu_walk' parameter is true, then the caller is doing a | ||
964 | pathwalk in RCU-walk mode. Sleeping is not permitted in this mode, | ||
965 | and the caller can be asked to leave it and call again by returing | ||
966 | -ECHILD. | ||
967 | |||
963 | This function is only used if DCACHE_MANAGE_TRANSIT is set on the | 968 | This function is only used if DCACHE_MANAGE_TRANSIT is set on the |
964 | dentry being transited from. | 969 | dentry being transited from. |
965 | 970 | ||