diff options
author | David Howells <dhowells@redhat.com> | 2019-11-21 10:12:17 +0100 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2019-11-21 10:12:17 +0100 |
commit | fc276122496df13341c1429fbd430d02462815c8 (patch) | |
tree | f89bf9a4b6a558e2cf509124bccf762aba91c2f1 | |
parent | afs: Use call->_iter not &call->iter in debugging statements (diff) | |
download | linux-fc276122496df13341c1429fbd430d02462815c8.tar.xz linux-fc276122496df13341c1429fbd430d02462815c8.zip |
afs: Switch the naming of call->iter and call->_iter
Change the name of call->iter to call->def_iter to represent the default
iterator.
Change the name of call->_iter to call->iter to represent the iterator
actually being used.
Signed-off-by: David Howells <dhowells@redhat.com>
-rw-r--r-- | fs/afs/cmservice.c | 6 | ||||
-rw-r--r-- | fs/afs/fsclient.c | 10 | ||||
-rw-r--r-- | fs/afs/internal.h | 10 | ||||
-rw-r--r-- | fs/afs/rxrpc.c | 12 | ||||
-rw-r--r-- | fs/afs/vlclient.c | 6 | ||||
-rw-r--r-- | fs/afs/yfsclient.c | 8 |
6 files changed, 26 insertions, 26 deletions
diff --git a/fs/afs/cmservice.c b/fs/afs/cmservice.c index b86195e4dc6c..ff3994a6be23 100644 --- a/fs/afs/cmservice.c +++ b/fs/afs/cmservice.c @@ -342,14 +342,14 @@ static int afs_deliver_cb_callback(struct afs_call *call) if (call->count2 != call->count && call->count2 != 0) return afs_protocol_error(call, -EBADMSG, afs_eproto_cb_count); - call->_iter = &call->iter; - iov_iter_discard(&call->iter, READ, call->count2 * 3 * 4); + call->iter = &call->def_iter; + iov_iter_discard(&call->def_iter, READ, call->count2 * 3 * 4); call->unmarshall++; /* Fall through */ case 4: _debug("extract discard %zu/%u", - iov_iter_count(&call->iter), call->count2 * 3 * 4); + iov_iter_count(call->iter), call->count2 * 3 * 4); ret = afs_extract_data(call, false); if (ret < 0) diff --git a/fs/afs/fsclient.c b/fs/afs/fsclient.c index 7de36f243346..1a48a0a08781 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) @@ -1852,7 +1852,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: diff --git a/fs/afs/internal.h b/fs/afs/internal.h index 759e0578012c..8440834a1c51 100644 --- a/fs/afs/internal.h +++ b/fs/afs/internal.h @@ -115,9 +115,9 @@ struct afs_call { struct afs_vnode *lvnode; /* vnode being locked */ void *request; /* request data (first part) */ struct address_space *mapping; /* Pages being written from */ - struct iov_iter iter; /* Buffer iterator */ - struct iov_iter *_iter; /* Iterator currently in use */ - union { /* Convenience for ->iter */ + struct iov_iter def_iter; /* Default buffer/data iterator */ + struct iov_iter *iter; /* Iterator currently in use */ + union { /* Convenience for ->def_iter */ struct kvec kvec[1]; struct bio_vec bvec[1]; }; @@ -1136,7 +1136,7 @@ static inline void afs_extract_begin(struct afs_call *call, void *buf, size_t si { call->kvec[0].iov_base = buf; call->kvec[0].iov_len = size; - iov_iter_kvec(&call->iter, READ, call->kvec, 1, size); + iov_iter_kvec(&call->def_iter, READ, call->kvec, 1, size); } static inline void afs_extract_to_tmp(struct afs_call *call) @@ -1151,7 +1151,7 @@ static inline void afs_extract_to_tmp64(struct afs_call *call) static inline void afs_extract_discard(struct afs_call *call, size_t size) { - iov_iter_discard(&call->iter, READ, size); + iov_iter_discard(&call->def_iter, READ, size); } static inline void afs_extract_to_buf(struct afs_call *call, size_t size) diff --git a/fs/afs/rxrpc.c b/fs/afs/rxrpc.c index 0e5269374ac1..aa6f5ff83733 100644 --- a/fs/afs/rxrpc.c +++ b/fs/afs/rxrpc.c @@ -152,7 +152,7 @@ static struct afs_call *afs_alloc_call(struct afs_net *net, INIT_WORK(&call->async_work, afs_process_async_call); init_waitqueue_head(&call->waitq); spin_lock_init(&call->state_lock); - call->_iter = &call->iter; + call->iter = &call->def_iter; o = atomic_inc_return(&net->nr_outstanding_calls); trace_afs_call(call, afs_call_trace_alloc, 1, o, @@ -513,12 +513,12 @@ static void afs_deliver_to_call(struct afs_call *call) state == AFS_CALL_SV_AWAIT_ACK ) { if (state == AFS_CALL_SV_AWAIT_ACK) { - iov_iter_kvec(&call->iter, READ, NULL, 0, 0); + iov_iter_kvec(&call->def_iter, READ, NULL, 0, 0); ret = rxrpc_kernel_recv_data(call->net->socket, - call->rxcall, &call->iter, + call->rxcall, &call->def_iter, false, &remote_abort, &call->service_id); - trace_afs_receive_data(call, &call->iter, false, ret); + trace_afs_receive_data(call, &call->def_iter, false, ret); if (ret == -EINPROGRESS || ret == -EAGAIN) return; @@ -858,7 +858,7 @@ static int afs_deliver_cm_op_id(struct afs_call *call) { int ret; - _enter("{%zu}", iov_iter_count(call->_iter)); + _enter("{%zu}", iov_iter_count(call->iter)); /* the operation ID forms the first four bytes of the request data */ ret = afs_extract_data(call, true); @@ -974,7 +974,7 @@ void afs_send_simple_reply(struct afs_call *call, const void *buf, size_t len) int afs_extract_data(struct afs_call *call, bool want_more) { struct afs_net *net = call->net; - struct iov_iter *iter = call->_iter; + struct iov_iter *iter = call->iter; enum afs_call_state state; u32 remote_abort = 0; int ret; diff --git a/fs/afs/vlclient.c b/fs/afs/vlclient.c index cfb0ac4bd039..516e9a3bb5b4 100644 --- a/fs/afs/vlclient.c +++ b/fs/afs/vlclient.c @@ -185,7 +185,7 @@ static int afs_deliver_vl_get_addrs_u(struct afs_call *call) int i, ret; _enter("{%u,%zu/%u}", - call->unmarshall, iov_iter_count(call->_iter), call->count); + call->unmarshall, iov_iter_count(call->iter), call->count); switch (call->unmarshall) { case 0: @@ -316,7 +316,7 @@ static int afs_deliver_vl_get_capabilities(struct afs_call *call) int ret; _enter("{%u,%zu/%u}", - call->unmarshall, iov_iter_count(call->_iter), call->count); + call->unmarshall, iov_iter_count(call->iter), call->count); switch (call->unmarshall) { case 0: @@ -425,7 +425,7 @@ static int afs_deliver_yfsvl_get_endpoints(struct afs_call *call) int ret; _enter("{%u,%zu,%u}", - call->unmarshall, iov_iter_count(call->_iter), call->count2); + call->unmarshall, iov_iter_count(call->iter), call->count2); switch (call->unmarshall) { case 0: diff --git a/fs/afs/yfsclient.c b/fs/afs/yfsclient.c index 79809739358f..8a8de5d0ab16 100644 --- a/fs/afs/yfsclient.c +++ b/fs/afs/yfsclient.c @@ -441,7 +441,7 @@ static int yfs_deliver_fs_fetch_data64(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: @@ -476,14 +476,14 @@ static int yfs_deliver_fs_fetch_data64(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) @@ -511,7 +511,7 @@ static int yfs_deliver_fs_fetch_data64(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) |