Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

David Wei and committed by
David S. Miller
3e61103b a9999732

+2 -2
+2 -2
net/core/page_pool.c
··· 1027 1027 /* To avoid races with recycling and additional barriers make sure 1028 1028 * pool and NAPI are unlinked when NAPI is disabled. 1029 1029 */ 1030 - WARN_ON(!test_bit(NAPI_STATE_SCHED, &pool->p.napi->state) || 1031 - READ_ONCE(pool->p.napi->list_owner) != -1); 1030 + WARN_ON(!test_bit(NAPI_STATE_SCHED, &pool->p.napi->state)); 1031 + WARN_ON(READ_ONCE(pool->p.napi->list_owner) != -1); 1032 1032 1033 1033 WRITE_ONCE(pool->p.napi, NULL); 1034 1034 }