diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2016-08-03 11:12:12 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2016-08-03 11:12:12 -0400 |
commit | 7d50a29fe43848b7d3c8309f8617db3305c0db18 (patch) | |
tree | 640ab336e23b4aa1e168ab2d0ed51a720ec8fc6d /fs/9p/fid.c | |
parent | 797fc16d8f00bf681b7f9969c0701725b472b11a (diff) | |
download | linux-7d50a29fe43848b7d3c8309f8617db3305c0db18.tar.gz linux-7d50a29fe43848b7d3c8309f8617db3305c0db18.tar.bz2 linux-7d50a29fe43848b7d3c8309f8617db3305c0db18.zip |
9p: use clone_fid()
in a bunch of places it cleans the things up
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/9p/fid.c')
-rw-r--r-- | fs/9p/fid.c | 26 |
1 files changed, 1 insertions, 25 deletions
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; /* |