Merge tag 'xfs-4.20-merge-2' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux
[platform/kernel/linux-starfive.git] / Documentation / filesystems / porting
index e6d4466..cf43bc4 100644 (file)
@@ -627,3 +627,14 @@ in your dentry operations instead.
        ->clone_file_range() and ->dedupe_file_range have been replaced with
        ->remap_file_range().  See Documentation/filesystems/vfs.txt for more
        information.
+--
+[recommended]
+       ->lookup() instances doing an equivalent of
+               if (IS_ERR(inode))
+                       return ERR_CAST(inode);
+               return d_splice_alias(inode, dentry);
+       don't need to bother with the check - d_splice_alias() will do the
+       right thing when given ERR_PTR(...) as inode.  Moreover, passing NULL
+       inode to d_splice_alias() will also do the right thing (equivalent of
+       d_add(dentry, NULL); return NULL;), so that kind of special cases
+       also doesn't need a separate treatment.