summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2018-01-11 03:40:49 -0500
committerChristoph Hellwig <hch@lst.de>2018-05-26 03:16:44 -0400
commitb28fc82267aa07c34e019a72c42292d156654ee8 (patch)
tree042a2aec6342c139702ccc56aad6e66855e3dda9 /crypto
parent5001c2dcdf17bb45d8a2c9f084e46e0e96e46939 (diff)
crypto: af_alg: convert to ->poll_mask
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'crypto')
-rw-r--r--crypto/af_alg.c13
-rw-r--r--crypto/algif_aead.c4
-rw-r--r--crypto/algif_skcipher.c4
3 files changed, 7 insertions, 14 deletions
diff --git a/crypto/af_alg.c b/crypto/af_alg.c
index 80838c1cef94..89ed613c017e 100644
--- a/crypto/af_alg.c
+++ b/crypto/af_alg.c
@@ -1060,19 +1060,12 @@ void af_alg_async_cb(struct crypto_async_request *_req, int err)
1060} 1060}
1061EXPORT_SYMBOL_GPL(af_alg_async_cb); 1061EXPORT_SYMBOL_GPL(af_alg_async_cb);
1062 1062
1063/** 1063__poll_t af_alg_poll_mask(struct socket *sock, __poll_t events)
1064 * af_alg_poll - poll system call handler
1065 */
1066__poll_t af_alg_poll(struct file *file, struct socket *sock,
1067 poll_table *wait)
1068{ 1064{
1069 struct sock *sk = sock->sk; 1065 struct sock *sk = sock->sk;
1070 struct alg_sock *ask = alg_sk(sk); 1066 struct alg_sock *ask = alg_sk(sk);
1071 struct af_alg_ctx *ctx = ask->private; 1067 struct af_alg_ctx *ctx = ask->private;
1072 __poll_t mask; 1068 __poll_t mask = 0;
1073
1074 sock_poll_wait(file, sk_sleep(sk), wait);
1075 mask = 0;
1076 1069
1077 if (!ctx->more || ctx->used) 1070 if (!ctx->more || ctx->used)
1078 mask |= EPOLLIN | EPOLLRDNORM; 1071 mask |= EPOLLIN | EPOLLRDNORM;
@@ -1082,7 +1075,7 @@ __poll_t af_alg_poll(struct file *file, struct socket *sock,
1082 1075
1083 return mask; 1076 return mask;
1084} 1077}
1085EXPORT_SYMBOL_GPL(af_alg_poll); 1078EXPORT_SYMBOL_GPL(af_alg_poll_mask);
1086 1079
1087/** 1080/**
1088 * af_alg_alloc_areq - allocate struct af_alg_async_req 1081 * af_alg_alloc_areq - allocate struct af_alg_async_req
diff --git a/crypto/algif_aead.c b/crypto/algif_aead.c
index 4b07edd5a9ff..330cf9f2b767 100644
--- a/crypto/algif_aead.c
+++ b/crypto/algif_aead.c
@@ -375,7 +375,7 @@ static struct proto_ops algif_aead_ops = {
375 .sendmsg = aead_sendmsg, 375 .sendmsg = aead_sendmsg,
376 .sendpage = af_alg_sendpage, 376 .sendpage = af_alg_sendpage,
377 .recvmsg = aead_recvmsg, 377 .recvmsg = aead_recvmsg,
378 .poll = af_alg_poll, 378 .poll_mask = af_alg_poll_mask,
379}; 379};
380 380
381static int aead_check_key(struct socket *sock) 381static int aead_check_key(struct socket *sock)
@@ -471,7 +471,7 @@ static struct proto_ops algif_aead_ops_nokey = {
471 .sendmsg = aead_sendmsg_nokey, 471 .sendmsg = aead_sendmsg_nokey,
472 .sendpage = aead_sendpage_nokey, 472 .sendpage = aead_sendpage_nokey,
473 .recvmsg = aead_recvmsg_nokey, 473 .recvmsg = aead_recvmsg_nokey,
474 .poll = af_alg_poll, 474 .poll_mask = af_alg_poll_mask,
475}; 475};
476 476
477static void *aead_bind(const char *name, u32 type, u32 mask) 477static void *aead_bind(const char *name, u32 type, u32 mask)
diff --git a/crypto/algif_skcipher.c b/crypto/algif_skcipher.c
index c4e885df4564..15cf3c5222e0 100644
--- a/crypto/algif_skcipher.c
+++ b/crypto/algif_skcipher.c
@@ -205,7 +205,7 @@ static struct proto_ops algif_skcipher_ops = {
205 .sendmsg = skcipher_sendmsg, 205 .sendmsg = skcipher_sendmsg,
206 .sendpage = af_alg_sendpage, 206 .sendpage = af_alg_sendpage,
207 .recvmsg = skcipher_recvmsg, 207 .recvmsg = skcipher_recvmsg,
208 .poll = af_alg_poll, 208 .poll_mask = af_alg_poll_mask,
209}; 209};
210 210
211static int skcipher_check_key(struct socket *sock) 211static int skcipher_check_key(struct socket *sock)
@@ -301,7 +301,7 @@ static struct proto_ops algif_skcipher_ops_nokey = {
301 .sendmsg = skcipher_sendmsg_nokey, 301 .sendmsg = skcipher_sendmsg_nokey,
302 .sendpage = skcipher_sendpage_nokey, 302 .sendpage = skcipher_sendpage_nokey,
303 .recvmsg = skcipher_recvmsg_nokey, 303 .recvmsg = skcipher_recvmsg_nokey,
304 .poll = af_alg_poll, 304 .poll_mask = af_alg_poll_mask,
305}; 305};
306 306
307static void *skcipher_bind(const char *name, u32 type, u32 mask) 307static void *skcipher_bind(const char *name, u32 type, u32 mask)