aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/page_pool.c
diff options
context:
space:
mode:
authorDavid Wei <[email protected]>2024-06-05 16:19:24 +0000
committerDavid S. Miller <[email protected]>2024-06-09 14:50:43 +0000
commit3e61103b2f7887af0be402a79b9c70425ceba3e3 (patch)
treeac1ee117ef2bbaec55aa94cdcec1dd50a92450a5 /net/core/page_pool.c
parentnet: ti: icssg-prueth: Add multicast filtering support (diff)
downloadkernel-3e61103b2f7887af0be402a79b9c70425ceba3e3.tar.gz
kernel-3e61103b2f7887af0be402a79b9c70425ceba3e3.zip
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 <[email protected]> Reviewed-by: Mina Almasry <[email protected]> Reviewed-by: Somnath Kotur <[email protected]> Acked-by: Jesper Dangaard Brouer <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/core/page_pool.c')
-rw-r--r--net/core/page_pool.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/core/page_pool.c b/net/core/page_pool.c
index f4444b4e39e6..3927a0a7fa9a 100644
--- a/net/core/page_pool.c
+++ b/net/core/page_pool.c
@@ -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);
}