diff options
author | Yunsheng Lin <linyunsheng@huawei.com> | 2024-10-28 19:53:39 +0800 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-11-11 10:56:27 -0800 |
commit | 3d18dfe69ce46f106af327736d2261d7e3ee81c0 (patch) | |
tree | 508012ac2ca4270f28b0eee0cceed9959c589dfd /net/rxrpc | |
parent | 8218f62c9c9b283dd296a23ea8fbbd6be7bd5760 (diff) | |
download | linux-3d18dfe69ce46f106af327736d2261d7e3ee81c0.tar.gz linux-3d18dfe69ce46f106af327736d2261d7e3ee81c0.tar.bz2 linux-3d18dfe69ce46f106af327736d2261d7e3ee81c0.zip |
mm: page_frag: avoid caller accessing 'page_frag_cache' directly
Use appropriate frag_page API instead of caller accessing
'page_frag_cache' directly.
CC: Andrew Morton <akpm@linux-foundation.org>
CC: Linux-MM <linux-mm@kvack.org>
Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Reviewed-by: Alexander Duyck <alexanderduyck@fb.com>
Acked-by: Chuck Lever <chuck.lever@oracle.com>
Link: https://patch.msgid.link/20241028115343.3405838-5-linyunsheng@huawei.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/rxrpc')
-rw-r--r-- | net/rxrpc/conn_object.c | 4 | ||||
-rw-r--r-- | net/rxrpc/local_object.c | 4 |
2 files changed, 2 insertions, 6 deletions
diff --git a/net/rxrpc/conn_object.c b/net/rxrpc/conn_object.c index 1539d315afe7..694c4df7a1a3 100644 --- a/net/rxrpc/conn_object.c +++ b/net/rxrpc/conn_object.c @@ -337,9 +337,7 @@ static void rxrpc_clean_up_connection(struct work_struct *work) */ rxrpc_purge_queue(&conn->rx_queue); - if (conn->tx_data_alloc.va) - __page_frag_cache_drain(virt_to_page(conn->tx_data_alloc.va), - conn->tx_data_alloc.pagecnt_bias); + page_frag_cache_drain(&conn->tx_data_alloc); call_rcu(&conn->rcu, rxrpc_rcu_free_connection); } diff --git a/net/rxrpc/local_object.c b/net/rxrpc/local_object.c index f9623ace2201..2792d2304605 100644 --- a/net/rxrpc/local_object.c +++ b/net/rxrpc/local_object.c @@ -452,9 +452,7 @@ void rxrpc_destroy_local(struct rxrpc_local *local) #endif rxrpc_purge_queue(&local->rx_queue); rxrpc_purge_client_connections(local); - if (local->tx_alloc.va) - __page_frag_cache_drain(virt_to_page(local->tx_alloc.va), - local->tx_alloc.pagecnt_bias); + page_frag_cache_drain(&local->tx_alloc); } /* |