From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shawn Bohrer Subject: [PATCH 3/3] epoll: remove unnecessary test of ep->ovflist for available events Date: Sat, 15 Jan 2011 11:00:37 -0600 Message-ID: <1295110837-3061-3-git-send-email-shawn.bohrer@gmail.com> References: <20110115162027.GA2552@lintop> Cc: Jack Stone , Viresh Kumar , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, viro@zeniv.linux.org.uk, Davide Libenzi , Shawn Bohrer To: Andrew Morton Return-path: Received: from mail-gw0-f46.google.com ([74.125.83.46]:60784 "EHLO mail-gw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753713Ab1AORB3 (ORCPT ); Sat, 15 Jan 2011 12:01:29 -0500 In-Reply-To: <20110115162027.GA2552@lintop> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: The additional test for ep->ovflist != EP_UNACTIVE_PTR to signify available events was added in 5071f97ec6d74f006072de0ce89b67c8792fe5a1 but doesn't appear to do anything. Either this is a bug or the check isn't needed. If the ep->ovflist is not EP_UNACTIVE_PTR then ep_send_events() calls ep_scan_ready_list() which sets ep->ovflist = NULL thus loosing any events which may have been stored there. Signed-off-by: Shawn Bohrer --- fs/eventpoll.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/eventpoll.c b/fs/eventpoll.c index 57a77f5..afeb78c 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c @@ -1180,7 +1180,7 @@ retry: } skip: /* Is it worth to try to dig for events ? */ - eavail = !list_empty(&ep->rdllist) || ep->ovflist != EP_UNACTIVE_PTR; + eavail = !list_empty(&ep->rdllist); spin_unlock_irqrestore(&ep->lock, flags); -- 1.7.3.4