diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-11-30 10:57:22 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-11-30 10:57:22 -0800 |
commit | 4a55d362ffe7caf099a01f6d2ed49a6ea03a4a88 (patch) | |
tree | 4471cf7361b83a4bc308a11b658c21eee1c738dc /fs/afs/fsclient.c | |
parent | 50b8b3f85a01543fb82d3bb9bfe7d06659522c70 (diff) | |
parent | 4fe171bb81b13b40bf568330ec3716dfb304ced1 (diff) | |
download | linux-4a55d362ffe7caf099a01f6d2ed49a6ea03a4a88.tar.bz2 |
Merge tag 'afs-next-20191121' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs
Pull AFS updates from David Howells:
"Minor cleanups and fix:
- Minor fix to make some debugging statements display information
from the correct iov_iter.
- Rename some members and variables to make things more obvious or
consistent.
- Provide a helper to wrap increments of the usage count on the
afs_read struct.
- Use scnprintf() to print into a stack buffer rather than sprintf().
- Remove some set but unused variables"
* tag 'afs-next-20191121' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs:
afs: Remove set but not used variable 'ret'
afs: Remove set but not used variables 'before', 'after'
afs: xattr: use scnprintf
afs: Introduce an afs_get_read() refcount helper
afs: Rename desc -> req in afs_fetch_data()
afs: Switch the naming of call->iter and call->_iter
afs: Use call->_iter not &call->iter in debugging statements
Diffstat (limited to 'fs/afs/fsclient.c')
-rw-r--r-- | fs/afs/fsclient.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/fs/afs/fsclient.c b/fs/afs/fsclient.c index 6f84231f11a5..1f9c5d8e6fe5 100644 --- a/fs/afs/fsclient.c +++ b/fs/afs/fsclient.c @@ -323,7 +323,7 @@ static int afs_deliver_fs_fetch_data(struct afs_call *call) int ret; _enter("{%u,%zu/%llu}", - call->unmarshall, iov_iter_count(&call->iter), req->actual_len); + call->unmarshall, iov_iter_count(call->iter), req->actual_len); switch (call->unmarshall) { case 0: @@ -363,14 +363,14 @@ static int afs_deliver_fs_fetch_data(struct afs_call *call) call->bvec[0].bv_len = size; call->bvec[0].bv_offset = req->offset; call->bvec[0].bv_page = req->pages[req->index]; - iov_iter_bvec(&call->iter, READ, call->bvec, 1, size); + iov_iter_bvec(&call->def_iter, READ, call->bvec, 1, size); ASSERTCMP(size, <=, PAGE_SIZE); /* Fall through */ /* extract the returned data */ case 2: _debug("extract data %zu/%llu", - iov_iter_count(&call->iter), req->remain); + iov_iter_count(call->iter), req->remain); ret = afs_extract_data(call, true); if (ret < 0) @@ -398,7 +398,7 @@ static int afs_deliver_fs_fetch_data(struct afs_call *call) case 3: _debug("extract discard %zu/%llu", - iov_iter_count(&call->iter), req->actual_len - req->len); + iov_iter_count(call->iter), req->actual_len - req->len); ret = afs_extract_data(call, true); if (ret < 0) @@ -490,7 +490,7 @@ static int afs_fs_fetch_data64(struct afs_fs_cursor *fc, 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; @@ -503,7 +503,6 @@ static int afs_fs_fetch_data64(struct afs_fs_cursor *fc, bp[6] = 0; bp[7] = htonl(lower_32_bits(req->len)); - 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); @@ -540,7 +539,7 @@ int afs_fs_fetch_data(struct afs_fs_cursor *fc, 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; @@ -551,7 +550,6 @@ int afs_fs_fetch_data(struct afs_fs_cursor *fc, bp[4] = htonl(lower_32_bits(req->pos)); bp[5] = htonl(lower_32_bits(req->len)); - 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); @@ -1852,7 +1850,7 @@ static int afs_deliver_fs_get_capabilities(struct afs_call *call) u32 count; int ret; - _enter("{%u,%zu}", call->unmarshall, iov_iter_count(&call->iter)); + _enter("{%u,%zu}", call->unmarshall, iov_iter_count(call->iter)); switch (call->unmarshall) { case 0: |