summaryrefslogtreecommitdiffstats
path: root/fs/afs/yfsclient.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2019-11-21 09:12:17 +0000
committerDavid Howells <dhowells@redhat.com>2019-11-21 09:12:17 +0000
commitd4438a25295d87d189e1925e0f7de2edcfe66582 (patch)
tree4c8c4ee14cf08efd4a71e650f467bc0b4bef6908 /fs/afs/yfsclient.c
parent0b9c0174d6b611356038e26d9434ad873f58e270 (diff)
afs: Introduce an afs_get_read() refcount helper
Introduce an afs_get_read() helper to get a reference on an afs_read object. Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'fs/afs/yfsclient.c')
-rw-r--r--fs/afs/yfsclient.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/afs/yfsclient.c b/fs/afs/yfsclient.c
index 8a8de5d0ab16..48a106514802 100644
--- a/fs/afs/yfsclient.c
+++ b/fs/afs/yfsclient.c
@@ -605,7 +605,7 @@ int yfs_fs_fetch_data(struct afs_fs_cursor *fc, struct afs_status_cb *scb,
call->key = fc->key;
call->out_scb = scb;
call->out_volsync = NULL;
- call->read_request = req;
+ call->read_request = afs_get_read(req);
/* marshall the parameters */
bp = call->request;
@@ -616,7 +616,6 @@ int yfs_fs_fetch_data(struct afs_fs_cursor *fc, struct afs_status_cb *scb,
bp = xdr_encode_u64(bp, req->len);
yfs_check_req(call, bp);
- refcount_inc(&req->usage);
afs_use_fs_server(call, fc->cbi);
trace_afs_make_fs_call(call, &vnode->fid);
afs_set_fc_call(call, fc);