mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 14:11:52 +00:00
page_pool: remove WARN_ON() with OR
Having an OR in WARN_ON() makes me sad because it's impossible to tell which condition is true when triggered. Split a WARN_ON() with an OR in page_pool_disable_direct_recycling(). Signed-off-by: David Wei <dw@davidwei.uk> Reviewed-by: Mina Almasry <almasrymina@google.com> Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com> Acked-by: Jesper Dangaard Brouer <hawk@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
a999973236
commit
3e61103b2f
@ -1027,8 +1027,8 @@ static void page_pool_disable_direct_recycling(struct page_pool *pool)
|
||||
/* To avoid races with recycling and additional barriers make sure
|
||||
* pool and NAPI are unlinked when NAPI is disabled.
|
||||
*/
|
||||
WARN_ON(!test_bit(NAPI_STATE_SCHED, &pool->p.napi->state) ||
|
||||
READ_ONCE(pool->p.napi->list_owner) != -1);
|
||||
WARN_ON(!test_bit(NAPI_STATE_SCHED, &pool->p.napi->state));
|
||||
WARN_ON(READ_ONCE(pool->p.napi->list_owner) != -1);
|
||||
|
||||
WRITE_ONCE(pool->p.napi, NULL);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user