ipc/sem.c: avoid using spin_unlock_wait()
[linux-block.git] / fs / eventpoll.c
index bcb68fcc844515c67e7efc83710dabdce361f8b9..5ec16313da1a1cc59f462038f331f50c35f8b89d 100644 (file)
@@ -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) ||