summaryrefslogtreecommitdiff
path: root/fs/9p/fid.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-08-07 14:01:14 (GMT)
committerLinus Torvalds <torvalds@linux-foundation.org>2016-08-07 14:01:14 (GMT)
commitfe64f3283fb315e3d8f2b78785a86904a852ca82 (patch)
tree3ab48823f0ef8b855f9b58809f09b9db2997f12e /fs/9p/fid.h
parent0cbbc422d56668528f6efd1234fe908010284082 (diff)
parentdb20a8925bc420eed033c5d91ff6afa74465e521 (diff)
downloadlinux-fe64f3283fb315e3d8f2b78785a86904a852ca82.tar.xz
Merge branch 'for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull more vfs updates from Al Viro: "Assorted cleanups and fixes. In the "trivial API change" department - ->d_compare() losing 'parent' argument" * 'for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: cachefiles: Fix race between inactivating and culling a cache object 9p: use clone_fid() 9p: fix braino introduced in "9p: new helper - v9fs_parent_fid()" vfs: make dentry_needs_remove_privs() internal vfs: remove file_needs_remove_privs() vfs: fix deadlock in file_remove_privs() on overlayfs get rid of 'parent' argument of ->d_compare() cifs, msdos, vfat, hfs+: don't bother with parent in ->d_compare() affs ->d_compare(): don't bother with ->d_inode fold _d_rehash() and __d_rehash() together fold dentry_rcuwalk_invalidate() into its only remaining caller
Diffstat (limited to 'fs/9p/fid.h')
-rw-r--r--fs/9p/fid.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/9p/fid.h b/fs/9p/fid.h
index 12700df..4491bca 100644
--- a/fs/9p/fid.h
+++ b/fs/9p/fid.h
@@ -28,7 +28,14 @@ static inline struct p9_fid *v9fs_parent_fid(struct dentry *dentry)
{
return v9fs_fid_lookup(dentry->d_parent);
}
-struct p9_fid *v9fs_fid_clone(struct dentry *dentry);
void v9fs_fid_add(struct dentry *dentry, struct p9_fid *fid);
struct p9_fid *v9fs_writeback_fid(struct dentry *dentry);
+static inline struct p9_fid *clone_fid(struct p9_fid *fid)
+{
+ return IS_ERR(fid) ? fid : p9_client_walk(fid, 0, NULL, 1);
+}
+static inline struct p9_fid *v9fs_fid_clone(struct dentry *dentry)
+{
+ return clone_fid(v9fs_fid_lookup(dentry));
+}
#endif