From 7d50a29fe43848b7d3c8309f8617db3305c0db18 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Wed, 3 Aug 2016 11:12:12 -0400 Subject: 9p: use clone_fid() in a bunch of places it cleans the things up Signed-off-by: Al Viro --- fs/9p/fid.c | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) (limited to 'fs/9p/fid.c') diff --git a/fs/9p/fid.c b/fs/9p/fid.c index 47db55aee7f2..60fb47469c86 100644 --- a/fs/9p/fid.c +++ b/fs/9p/fid.c @@ -257,36 +257,12 @@ struct p9_fid *v9fs_fid_lookup(struct dentry *dentry) return v9fs_fid_lookup_with_uid(dentry, uid, any); } -struct p9_fid *v9fs_fid_clone(struct dentry *dentry) -{ - struct p9_fid *fid, *ret; - - fid = v9fs_fid_lookup(dentry); - if (IS_ERR(fid)) - return fid; - - ret = p9_client_walk(fid, 0, NULL, 1); - return ret; -} - -static struct p9_fid *v9fs_fid_clone_with_uid(struct dentry *dentry, kuid_t uid) -{ - struct p9_fid *fid, *ret; - - fid = v9fs_fid_lookup_with_uid(dentry, uid, 0); - if (IS_ERR(fid)) - return fid; - - ret = p9_client_walk(fid, 0, NULL, 1); - return ret; -} - struct p9_fid *v9fs_writeback_fid(struct dentry *dentry) { int err; struct p9_fid *fid; - fid = v9fs_fid_clone_with_uid(dentry, GLOBAL_ROOT_UID); + fid = clone_fid(v9fs_fid_lookup_with_uid(dentry, GLOBAL_ROOT_UID, 0)); if (IS_ERR(fid)) goto error_out; /* -- cgit v1.2.3