From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 9C2C61F45F for ; Sat, 11 May 2019 07:56:30 +0000 (UTC) From: Eric Wong To: cmogstored-public@bogomips.org Subject: [PATCH] notify.c: workaround epoll_pwait bug in current Linux 5.0/5.1 Date: Sat, 11 May 2019 07:56:30 +0000 Message-Id: <20190511075630.17811-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: The bugfix should hit mainline and stable kernels, soon; but there's no reason for us to be caring if errno is EINTR, or not... https://lore.kernel.org/lkml/20190427093319.sgicqik2oqkez3wk@dcvr/ https://lore.kernel.org/lkml/20190507043954.9020-1-deepa.kernel@gmail.com/ --- notify.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/notify.c b/notify.c index 73e772a..1deed82 100644 --- a/notify.c +++ b/notify.c @@ -100,7 +100,14 @@ void mog_notify_wait(bool need_usage_file) mfd = mog_idleq_wait_intr(mog_notify_queue, timeout); if (mfd) notify_queue_step(mfd); - else if (errno == EINTR) + else + /* + * errno == EINTR, but epoll_pwait on some Linux v5.0+/v5.1+ + * fails to return EINTR. This should be fixed in Linux, + * soon: + * <20190427093319.sgicqik2oqkez3wk@dcvr> + * <20190507043954.9020-1-deepa.kernel@gmail.com> + */ note_run(); } -- EW