summaryrefslogtreecommitdiff
path: root/include/linux/dcache.h
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2021-01-05 22:13:52 +0300
committerAl Viro <viro@zeniv.linux.org.uk>2021-01-16 23:12:06 +0300
commitbca585d24a1719d9314d5438b0d2804a33d9bbb6 (patch)
treeaa7d4a45ea39b63deb8e0ebbb82f1c9d2aa0ee0e /include/linux/dcache.h
parentd36a1dd9f77ae1e72da48f4123ed35627848507d (diff)
downloadlinux-bca585d24a1719d9314d5438b0d2804a33d9bbb6.tar.xz
new helper: d_find_alias_rcu()
similar to d_find_alias(inode), except that * the caller must be holding rcu_read_lock() * inode must not be freed until matching rcu_read_unlock() * result is *NOT* pinned and can only be dereferenced until the matching rcu_read_unlock(). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux/dcache.h')
-rw-r--r--include/linux/dcache.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/dcache.h b/include/linux/dcache.h
index d7b369fc15d3..c1e48014106f 100644
--- a/include/linux/dcache.h
+++ b/include/linux/dcache.h
@@ -262,6 +262,8 @@ extern void d_tmpfile(struct dentry *, struct inode *);
extern struct dentry *d_find_alias(struct inode *);
extern void d_prune_aliases(struct inode *);
+extern struct dentry *d_find_alias_rcu(struct inode *);
+
/* test whether we have any submounts in a subdir tree */
extern int path_has_submounts(const struct path *);