Cc: Eric Dumazet <eric.dumazet@...>, Jiri Olsa <jolsa@...>, <netdev@...>, Linux Kernel Mailing List <linux-kernel@...>, <fbl@...>, <nhorman@...>, <davem@...>, Tejun Heo <htejun@...>
And if we remove waitqueue_active() in xxx_update(), then lock/unlock is
not needed too.
If xxx_poll() takes q->lock first, it can safely miss the changes in ->status
and schedule(): xxx_update() will take q->lock, notice the sleeper and wake
it up (ok, it will set ->triggered but this doesn't matter).
If xxx_update() takes q->lock first, xxx_poll() must see the changes in
status after poll_wait()->unlock(&q->lock) (in fact, after lock, not unlock).
Oleg.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html