X-Git-Url: http://git.monstr.eu/?a=blobdiff_plain;f=fs%2F9p%2Ffid.h;h=4491bcaf42b80694fff3fc4f6a62687798016fd4;hb=787ad90332b3573d502a6c1aff52f708ca141976;hp=12700df0bb513c53290baef5ae9eb5aa6cb0abfd;hpb=0603006b450004213eeed22d4fbcc103c994c2e6;p=linux-2.6-microblaze.git diff --git a/fs/9p/fid.h b/fs/9p/fid.h index 12700df0bb51..4491bcaf42b8 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