diff options
author | Christoph Hellwig <hch@lst.de> | 2015-02-11 19:56:46 +0100 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2015-03-13 04:50:23 +0100 |
commit | 66ee59af630fd8d5f4f56fb28162857e629aa0ab (patch) | |
tree | d1c4293f986fcb20824c90a2ab5f3f4e62543f8a /net | |
parent | gadgetfs: really get rid of switching ->f_op (diff) | |
download | linux-66ee59af630fd8d5f4f56fb28162857e629aa0ab.tar.xz linux-66ee59af630fd8d5f4f56fb28162857e629aa0ab.zip |
fs: remove ki_nbytes
There is no need to pass the total request length in the kiocb, as
we already get passed in through the iov_iter argument.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'net')
-rw-r--r-- | net/socket.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/socket.c b/net/socket.c index bbedbfcb42c2..f92145554f34 100644 --- a/net/socket.c +++ b/net/socket.c @@ -858,11 +858,11 @@ static ssize_t sock_read_iter(struct kiocb *iocb, struct iov_iter *to) if (iocb->ki_pos != 0) return -ESPIPE; - if (iocb->ki_nbytes == 0) /* Match SYS5 behaviour */ + if (!iov_iter_count(to)) /* Match SYS5 behaviour */ return 0; res = __sock_recvmsg(iocb, sock, &msg, - iocb->ki_nbytes, msg.msg_flags); + iov_iter_count(to), msg.msg_flags); *to = msg.msg_iter; return res; } @@ -883,7 +883,7 @@ static ssize_t sock_write_iter(struct kiocb *iocb, struct iov_iter *from) if (sock->type == SOCK_SEQPACKET) msg.msg_flags |= MSG_EOR; - res = __sock_sendmsg(iocb, sock, &msg, iocb->ki_nbytes); + res = __sock_sendmsg(iocb, sock, &msg, iov_iter_count(from)); *from = msg.msg_iter; return res; } |