Re: net: Generalise wq_has_sleeper helper

From: David Miller
Date: Tue Nov 24 2015 - 16:30:35 EST


From: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 24 Nov 2015 13:54:23 +0800

> On Wed, Nov 11, 2015 at 05:48:29PM +0800, Herbert Xu wrote:
>>
>> BTW, the networking folks found this years ago and even added
>> helpers to deal with this. See for example wq_has_sleeper in
>> include/net/sock.h. It would be good if we can move some of
>> those helpers into wait.h instead.
>
> Here is a patch against net-next which makes the wq_has_sleeper
> helper available to non-next users:
>
> ---8<---
> The memory barrier in the helper wq_has_sleeper is needed by just
> about every user of waitqueue_active. This patch generalises it
> by making it take a wait_queue_head_t directly. The existing
> helper is renamed to skwq_has_sleeper.
>
> Signed-off-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>

I'm fine with wherever this patch goes. Herbert is there any
particular tree where it'll facilitate another user quickest?

Or should I just toss it into net-next?

Acked-by: David S. Miller <davem@xxxxxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/