From d4438a25295d87d189e1925e0f7de2edcfe66582 Mon Sep 17 00:00:00 2001 From: David Howells Date: Thu, 21 Nov 2019 09:12:17 +0000 Subject: 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 --- fs/afs/yfsclient.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'fs/afs/yfsclient.c') 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); -- cgit v1.2.3