Skip to content

Commit 6b25364

Browse files
dhowellsPaolo Abeni
authored andcommitted
rxrpc: Fix use of changed alignment param to page_frag_alloc_align()
Commit 411c5f3 ("mm/page_alloc: modify page_frag_alloc_align() to accept align as an argument") changed the way page_frag_alloc_align() worked, but it didn't fix AF_RXRPC as that use of that allocator function hadn't been merged yet at the time. Now, when the AFS filesystem is used, this results in: WARNING: CPU: 4 PID: 379 at include/linux/gfp.h:323 rxrpc_alloc_data_txbuf+0x9d/0x2b0 [rxrpc] Fix this by using __page_frag_alloc_align() instead. Note that it might be better to use an order-based alignment rather than a mask-based alignment. Fixes: 49489bb ("rxrpc: Do zerocopy using MSG_SPLICE_PAGES and page frags") Signed-off-by: David Howells <dhowells@redhat.com> Reported-by: Marc Dionne <marc.dionne@auristor.com> cc: Yunsheng Lin <linyunsheng@huawei.com> cc: Alexander Duyck <alexander.duyck@gmail.com> cc: Michael S. Tsirkin <mst@redhat.com> cc: "David S. Miller" <davem@davemloft.net> cc: Eric Dumazet <edumazet@google.com> cc: Jakub Kicinski <kuba@kernel.org> cc: Paolo Abeni <pabeni@redhat.com> cc: linux-afs@lists.infradead.org cc: netdev@vger.kernel.org Signed-off-by: Paolo Abeni <pabeni@redhat.com>
1 parent ddbec99 commit 6b25364

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

net/rxrpc/txbuf.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ struct rxrpc_txbuf *rxrpc_alloc_data_txbuf(struct rxrpc_call *call, size_t data_
3333
total = hoff + sizeof(*whdr) + data_size;
3434

3535
mutex_lock(&call->conn->tx_data_alloc_lock);
36-
buf = page_frag_alloc_align(&call->conn->tx_data_alloc, total, gfp,
37-
~(data_align - 1) & ~(L1_CACHE_BYTES - 1));
36+
buf = __page_frag_alloc_align(&call->conn->tx_data_alloc, total, gfp,
37+
~(data_align - 1) & ~(L1_CACHE_BYTES - 1));
3838
mutex_unlock(&call->conn->tx_data_alloc_lock);
3939
if (!buf) {
4040
kfree(txb);

0 commit comments

Comments
 (0)