lkml.org 
[lkml]   [2013]   [Sep]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 09/11] epoll: Remove unnecessary error path
Date
From: Andi Kleen <ak@linux.intel.com>

A static checker was pointing out that nothing can possible set
nwait < 0 in this path. The comment and the check appears to be
outdated. Remove it.

Cc: viro@zeniv.linux.org.uk
Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
fs/eventpoll.c | 10 ----------
1 file changed, 10 deletions(-)

diff --git a/fs/eventpoll.c b/fs/eventpoll.c
index 473e09d..f72bf55 100644
--- a/fs/eventpoll.c
+++ b/fs/eventpoll.c
@@ -1276,15 +1276,6 @@ static int ep_insert(struct eventpoll *ep, struct epoll_event *event,
*/
revents = ep_item_poll(epi, &epq.pt);

- /*
- * We have to check if something went wrong during the poll wait queue
- * install process. Namely an allocation for a wait queue failed due
- * high memory pressure.
- */
- error = -ENOMEM;
- if (epi->nwait < 0)
- goto error_unregister;
-
/* Add the current item to the list of active epoll hook for this file */
spin_lock(&tfile->f_lock);
list_add_tail(&epi->fllink, &tfile->f_ep_links);
@@ -1334,7 +1325,6 @@ error_remove_epi:

rb_erase(&epi->rbn, &ep->rbr);

-error_unregister:
ep_unregister_pollwait(ep, epi);

/*
--
1.8.3.1


\
 
 \ /
  Last update: 2013-09-30 23:01    [W:0.166 / U:0.924 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site