summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-02-11 17:34:03 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2018-02-11 17:34:03 -0500
commita9a08845e9acbd224e4ee466f5c1275ed50054e8 (patch)
tree415d6e6a82e001c65e6b161539411f54ba5fe8ce /crypto
parentee5daa1361fceb6f482c005bcc9ba8d01b92ea5c (diff)
vfs: do bulk POLL* -> EPOLL* replacement
This is the mindless scripted replacement of kernel use of POLL* variables as described by Al, done by this script: for V in IN OUT PRI ERR RDNORM RDBAND WRNORM WRBAND HUP RDHUP NVAL MSG; do L=`git grep -l -w POLL$V | grep -v '^t' | grep -v /um/ | grep -v '^sa' | grep -v '/poll.h$'|grep -v '^D'` for f in $L; do sed -i "-es/^\([^\"]*\)\(\<POLL$V\>\)/\\1E\\2/" $f; done done with de-mangling cleanups yet to come. NOTE! On almost all architectures, the EPOLL* constants have the same values as the POLL* constants do. But they keyword here is "almost". For various bad reasons they aren't the same, and epoll() doesn't actually work quite correctly in some cases due to this on Sparc et al. The next patch from Al will sort out the final differences, and we should be all done. Scripted-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'crypto')
-rw-r--r--crypto/af_alg.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/crypto/af_alg.c b/crypto/af_alg.c
index 0f8d8d5523c3..c49766b03165 100644
--- a/crypto/af_alg.c
+++ b/crypto/af_alg.c
@@ -735,9 +735,9 @@ void af_alg_wmem_wakeup(struct sock *sk)
735 rcu_read_lock(); 735 rcu_read_lock();
736 wq = rcu_dereference(sk->sk_wq); 736 wq = rcu_dereference(sk->sk_wq);
737 if (skwq_has_sleeper(wq)) 737 if (skwq_has_sleeper(wq))
738 wake_up_interruptible_sync_poll(&wq->wait, POLLIN | 738 wake_up_interruptible_sync_poll(&wq->wait, EPOLLIN |
739 POLLRDNORM | 739 EPOLLRDNORM |
740 POLLRDBAND); 740 EPOLLRDBAND);
741 sk_wake_async(sk, SOCK_WAKE_WAITD, POLL_IN); 741 sk_wake_async(sk, SOCK_WAKE_WAITD, POLL_IN);
742 rcu_read_unlock(); 742 rcu_read_unlock();
743} 743}
@@ -800,9 +800,9 @@ void af_alg_data_wakeup(struct sock *sk)
800 rcu_read_lock(); 800 rcu_read_lock();
801 wq = rcu_dereference(sk->sk_wq); 801 wq = rcu_dereference(sk->sk_wq);
802 if (skwq_has_sleeper(wq)) 802 if (skwq_has_sleeper(wq))
803 wake_up_interruptible_sync_poll(&wq->wait, POLLOUT | 803 wake_up_interruptible_sync_poll(&wq->wait, EPOLLOUT |
804 POLLRDNORM | 804 EPOLLRDNORM |
805 POLLRDBAND); 805 EPOLLRDBAND);
806 sk_wake_async(sk, SOCK_WAKE_SPACE, POLL_OUT); 806 sk_wake_async(sk, SOCK_WAKE_SPACE, POLL_OUT);
807 rcu_read_unlock(); 807 rcu_read_unlock();
808} 808}
@@ -1076,10 +1076,10 @@ __poll_t af_alg_poll(struct file *file, struct socket *sock,
1076 mask = 0; 1076 mask = 0;
1077 1077
1078 if (!ctx->more || ctx->used) 1078 if (!ctx->more || ctx->used)
1079 mask |= POLLIN | POLLRDNORM; 1079 mask |= EPOLLIN | EPOLLRDNORM;
1080 1080
1081 if (af_alg_writable(sk)) 1081 if (af_alg_writable(sk))
1082 mask |= POLLOUT | POLLWRNORM | POLLWRBAND; 1082 mask |= EPOLLOUT | EPOLLWRNORM | EPOLLWRBAND;
1083 1083
1084 return mask; 1084 return mask;
1085} 1085}