diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2014-12-15 21:39:31 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2015-04-11 15:53:35 -0400 |
commit | 6837eb5b934cd818b506749bf1356095a809fbd2 (patch) | |
tree | 82eaec5f91481288ca642f3a7361b6c480f7576d /crypto/algif_skcipher.c | |
parent | 29f17d3f44c368f0e791bb1e419ccd358f2d1430 (diff) | |
download | linux-crypto-6837eb5b934cd818b506749bf1356095a809fbd2.tar.gz linux-crypto-6837eb5b934cd818b506749bf1356095a809fbd2.zip |
new helper: msg_data_left()
convert open-coded instances
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to '')
-rw-r--r-- | crypto/algif_skcipher.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/algif_skcipher.c b/crypto/algif_skcipher.c index 8f903b6d..94507529 100644 --- a/crypto/algif_skcipher.c +++ b/crypto/algif_skcipher.c @@ -641,7 +641,7 @@ static int skcipher_recvmsg_sync(struct socket *sock, struct msghdr *msg, long copied = 0; lock_sock(sk); - while (iov_iter_count(&msg->msg_iter)) { + while (msg_data_left(msg)) { sgl = list_first_entry(&ctx->tsgl, struct skcipher_sg_list, list); sg = sgl->sg; @@ -655,7 +655,7 @@ static int skcipher_recvmsg_sync(struct socket *sock, struct msghdr *msg, goto unlock; } - used = min_t(unsigned long, ctx->used, iov_iter_count(&msg->msg_iter)); + used = min_t(unsigned long, ctx->used, msg_data_left(msg)); used = af_alg_make_sg(&ctx->rsgl, &msg->msg_iter, used); err = used; |