diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2022-09-15 20:25:47 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2022-11-25 13:01:55 -0500 |
commit | de4eda9de2d957ef2d6a8365a01e26a435e958cb (patch) | |
tree | 49b0d60dedb65af7f0d3e874ee9c661e6b09697b /net/ceph/messenger_v1.c | |
parent | a41dad905e5a388f88435a517de102e9b2c8e43d (diff) | |
download | linux-de4eda9de2d957ef2d6a8365a01e26a435e958cb.tar.gz linux-de4eda9de2d957ef2d6a8365a01e26a435e958cb.tar.bz2 linux-de4eda9de2d957ef2d6a8365a01e26a435e958cb.zip |
use less confusing names for iov_iter direction initializers
READ/WRITE proved to be actively confusing - the meanings are
"data destination, as used with read(2)" and "data source, as
used with write(2)", but people keep interpreting those as
"we read data from it" and "we write data to it", i.e. exactly
the wrong way.
Call them ITER_DEST and ITER_SOURCE - at least that is harder
to misinterpret...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'net/ceph/messenger_v1.c')
-rw-r--r-- | net/ceph/messenger_v1.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ceph/messenger_v1.c b/net/ceph/messenger_v1.c index 3ddbde87e4d6..d1787d7d33ef 100644 --- a/net/ceph/messenger_v1.c +++ b/net/ceph/messenger_v1.c @@ -30,7 +30,7 @@ static int ceph_tcp_recvmsg(struct socket *sock, void *buf, size_t len) if (!buf) msg.msg_flags |= MSG_TRUNC; - iov_iter_kvec(&msg.msg_iter, READ, &iov, 1, len); + iov_iter_kvec(&msg.msg_iter, ITER_DEST, &iov, 1, len); r = sock_recvmsg(sock, &msg, msg.msg_flags); if (r == -EAGAIN) r = 0; @@ -49,7 +49,7 @@ static int ceph_tcp_recvpage(struct socket *sock, struct page *page, int r; BUG_ON(page_offset + length > PAGE_SIZE); - iov_iter_bvec(&msg.msg_iter, READ, &bvec, 1, length); + iov_iter_bvec(&msg.msg_iter, ITER_DEST, &bvec, 1, length); r = sock_recvmsg(sock, &msg, msg.msg_flags); if (r == -EAGAIN) r = 0; |