aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/filesystems
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2014-10-12 22:24:21 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2014-11-19 13:01:20 -0500
commit41d28bca2da4bd75a8915c1ccf2cacf7f4a2e531 (patch)
tree1a3d658ecfe4375e0ca4f837f6c7f8397efdefba /Documentation/filesystems
parentb5ae6b15bd73e35b129408755a0804287a87e041 (diff)
switch d_materialise_unique() users to d_splice_alias()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'Documentation/filesystems')
-rw-r--r--Documentation/filesystems/nfs/Exporting23
-rw-r--r--Documentation/filesystems/porting4
2 files changed, 9 insertions, 18 deletions
diff --git a/Documentation/filesystems/nfs/Exporting b/Documentation/filesystems/nfs/Exporting
index c8f036a9b13f..520a4becb75c 100644
--- a/Documentation/filesystems/nfs/Exporting
+++ b/Documentation/filesystems/nfs/Exporting
@@ -72,24 +72,11 @@ c/ Helper routines to allocate anonymous dentries, and to help attach
72 DCACHE_DISCONNECTED) dentry is allocated and attached. 72 DCACHE_DISCONNECTED) dentry is allocated and attached.
73 In the case of a directory, care is taken that only one dentry 73 In the case of a directory, care is taken that only one dentry
74 can ever be attached. 74 can ever be attached.
75 d_splice_alias(inode, dentry) or d_materialise_unique(dentry, inode) 75 d_splice_alias(inode, dentry) will introduce a new dentry into the tree;
76 will introduce a new dentry into the tree; either the passed-in 76 either the passed-in dentry or a preexisting alias for the given inode
77 dentry or a preexisting alias for the given inode (such as an 77 (such as an anonymous one created by d_obtain_alias), if appropriate.
78 anonymous one created by d_obtain_alias), if appropriate. The two 78 It returns NULL when the passed-in dentry is used, following the calling
79 functions differ in their handling of directories with preexisting 79 convention of ->lookup.
80 aliases:
81 d_splice_alias will use any existing IS_ROOT dentry, but it will
82 return -EIO rather than try to move a dentry with a different
83 parent. This is appropriate for local filesystems, which
84 should never see such an alias unless the filesystem is
85 corrupted somehow (for example, if two on-disk directory
86 entries refer to the same directory.)
87 d_materialise_unique will attempt to move any dentry. This is
88 appropriate for distributed filesystems, where finding a
89 directory other than where we last cached it may be a normal
90 consequence of concurrent operations on other hosts.
91 Both functions return NULL when the passed-in dentry is used,
92 following the calling convention of ->lookup.
93 80
94 81
95Filesystem Issues 82Filesystem Issues
diff --git a/Documentation/filesystems/porting b/Documentation/filesystems/porting
index 0f3a1390bf00..b6b55a9cffee 100644
--- a/Documentation/filesystems/porting
+++ b/Documentation/filesystems/porting
@@ -463,3 +463,7 @@ in your dentry operations instead.
463 of the in-tree instances did). inode_hash_lock is still held, 463 of the in-tree instances did). inode_hash_lock is still held,
464 of course, so they are still serialized wrt removal from inode hash, 464 of course, so they are still serialized wrt removal from inode hash,
465 as well as wrt set() callback of iget5_locked(). 465 as well as wrt set() callback of iget5_locked().
466--
467[mandatory]
468 d_materialise_unique() is gone; d_splice_alias() does everything you
469 need now. Remember that they have opposite orders of arguments ;-/