Skip to content

Commit 2fa3810

Browse files
committed
page_pool: remove WARN_ON() with OR
JIRA: https://issues.redhat.com/browse/RHEL-93737 commit 3e61103 Author: David Wei <dw@davidwei.uk> Date: Wed Jun 5 09:19:24 2024 -0700 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> Signed-off-by: Ivan Vecera <ivecera@redhat.com>
1 parent 5b54e29 commit 2fa3810

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

net/core/page_pool.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1079,8 +1079,8 @@ void page_pool_disable_direct_recycling(struct page_pool *pool)
10791079
/* To avoid races with recycling and additional barriers make sure
10801080
* pool and NAPI are unlinked when NAPI is disabled.
10811081
*/
1082-
WARN_ON(!test_bit(NAPI_STATE_SCHED, &pool->p.napi->state) ||
1083-
READ_ONCE(pool->p.napi->list_owner) != -1);
1082+
WARN_ON(!test_bit(NAPI_STATE_SCHED, &pool->p.napi->state));
1083+
WARN_ON(READ_ONCE(pool->p.napi->list_owner) != -1);
10841084

10851085
mutex_lock(&page_pools_lock);
10861086
WRITE_ONCE(pool->p.napi, NULL);

0 commit comments

Comments
 (0)