]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - fs/eventpoll.c
afs: Better abort and net error handling
[karo-tx-linux.git] / fs / eventpoll.c
index bcb68fcc844515c67e7efc83710dabdce361f8b9..341251421ced00ab1be854c4145cf408cfc93c2f 100644 (file)
@@ -13,7 +13,7 @@
 
 #include <linux/init.h>
 #include <linux/kernel.h>
-#include <linux/sched.h>
+#include <linux/sched/signal.h>
 #include <linux/fs.h>
 #include <linux/file.h>
 #include <linux/signal.h>
@@ -1895,7 +1895,7 @@ SYSCALL_DEFINE4(epoll_ctl, int, epfd, int, op, int, fd,
         * so EPOLLEXCLUSIVE is not allowed for a EPOLL_CTL_MOD operation.
         * Also, we do not currently supported nested exclusive wakeups.
         */
-       if (epds.events & EPOLLEXCLUSIVE) {
+       if (ep_op_has_event(op) && (epds.events & EPOLLEXCLUSIVE)) {
                if (op == EPOLL_CTL_MOD)
                        goto error_tgt_fput;
                if (op == EPOLL_CTL_ADD && (is_file_epoll(tf.file) ||