[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <7AFB0C38-3D2E-45E8-9092-CA424BFD32B6@dilger.ca>
Date: Wed, 6 Dec 2017 19:38:48 -0700
From: Andreas Dilger <adilger@...ger.ca>
To: Ingo Molnar <mingo@...nel.org>
Cc: Christoph Hellwig <hch@....de>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Al Viro <viro@...iv.linux.org.uk>,
Jason Baron <jbaron@...mai.com>, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] epoll: use the waitqueue lock to protect ep->wq
> On Dec 6, 2017, at 17:49, Ingo Molnar <mingo@...nel.org> wrote:
>
> This exposes some waitqueue internals, but AFAICS the FUSE code already does a
> similar trick with fiq->waitq.lock so there's precedent.
What about waitqueue_lock() and waitqueue_unlock() helpers that
lock and unlock, to avoid exposing the internals? Or would that add
confusion by making users think they need their own waitqueue locking?
Alternately, a helper that returns the pointer to the lock:
#define waitqueue_lockp(wq) &((wq)->lock)
Used like the following:
spin_lock_irqsave(waitqueue_lockp(&ep->wq), flags);
Cheers, Andreas
Powered by blists - more mailing lists