summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2013-11-05 16:57:01 +1100
committerStephen Rothwell <sfr@canb.auug.org.au>2013-11-05 16:57:01 +1100
commit67fd4e3465df1abf96dad1e49e358df934503cdd (patch)
treec79004087435da87347a34d50370ec7eca3fac1d /fs
parent290968b8161b40757d399f2262bc7cbe46596be2 (diff)
epoll-do-not-take-global-epmutex-for-simple-topologies-fix
- use `bool' for boolean variables - remove unneeded/undesirable cast of void* - add missed ep_scan_ready_list() kerneldoc Cc: "Paul E. McKenney" <paulmck@us.ibm.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Davide Libenzi <davidel@xmailserver.org> Cc: Eric Wong <normalperson@yhbt.net> Cc: Jason Baron <jbaron@akamai.com> Cc: Nathan Zimmer <nzimmer@sgi.com> Cc: Nelson Elhage <nelhage@nelhage.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/eventpoll.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/fs/eventpoll.c b/fs/eventpoll.c
index 5c64a6503dbf..f7fe7e3ce664 100644
--- a/fs/eventpoll.c
+++ b/fs/eventpoll.c
@@ -585,13 +585,14 @@ static inline void ep_pm_stay_awake_rcu(struct epitem *epi)
* @sproc: Pointer to the scan callback.
* @priv: Private opaque data passed to the @sproc callback.
* @depth: The current depth of recursive f_op->poll calls.
+ * @ep_locked: caller already holds ep->mtx
*
* Returns: The same integer error code returned by the @sproc callback.
*/
static int ep_scan_ready_list(struct eventpoll *ep,
int (*sproc)(struct eventpoll *,
struct list_head *, void *),
- void *priv, int depth, int ep_locked)
+ void *priv, int depth, bool ep_locked)
{
int error, pwake = 0;
unsigned long flags;
@@ -829,12 +830,12 @@ static void ep_ptable_queue_proc(struct file *file, wait_queue_head_t *whead,
struct readyevents_arg {
struct eventpoll *ep;
- int locked;
+ bool locked;
};
static int ep_poll_readyevents_proc(void *priv, void *cookie, int call_nests)
{
- struct readyevents_arg *arg = (struct readyevents_arg *)priv;
+ struct readyevents_arg *arg = priv;
return ep_scan_ready_list(arg->ep, ep_read_events_proc, NULL,
call_nests + 1, arg->locked);
@@ -850,7 +851,7 @@ static unsigned int ep_eventpoll_poll(struct file *file, poll_table *wait)
* During ep_insert() we already hold the ep->mtx for the tfile.
* Prevent re-aquisition.
*/
- arg.locked = ((wait && (wait->_qproc == ep_ptable_queue_proc)) ? 1 : 0);
+ arg.locked = wait && (wait->_qproc == ep_ptable_queue_proc);
arg.ep = ep;
/* Insert inside our poll wait queue */
@@ -1553,7 +1554,7 @@ static int ep_send_events(struct eventpoll *ep,
esed.maxevents = maxevents;
esed.events = events;
- return ep_scan_ready_list(ep, ep_send_events_proc, &esed, 0, 0);
+ return ep_scan_ready_list(ep, ep_send_events_proc, &esed, 0, false);
}
static inline struct timespec ep_set_mstimeout(long ms)