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

rxrpc: Don't pass gfp around in incoming call handling functions

Don't pass gfp around in incoming call handling functions, but rather hard
code it at the points where we actually need it since the value comes from
within the rxrpc driver and is always the same.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

David Howells and committed by
David S. Miller
843099ca dc44b3a0

+9 -12
+2 -2
net/rxrpc/ar-accept.c
··· 108 108 goto error; 109 109 } 110 110 111 - conn = rxrpc_incoming_connection(trans, &sp->hdr, GFP_NOIO); 111 + conn = rxrpc_incoming_connection(trans, &sp->hdr); 112 112 rxrpc_put_transport(trans); 113 113 if (IS_ERR(conn)) { 114 114 _debug("no conn"); ··· 116 116 goto error; 117 117 } 118 118 119 - call = rxrpc_incoming_call(rx, conn, &sp->hdr, GFP_NOIO); 119 + call = rxrpc_incoming_call(rx, conn, &sp->hdr); 120 120 rxrpc_put_connection(conn); 121 121 if (IS_ERR(call)) { 122 122 _debug("no call");
+3 -4
net/rxrpc/ar-call.c
··· 411 411 */ 412 412 struct rxrpc_call *rxrpc_incoming_call(struct rxrpc_sock *rx, 413 413 struct rxrpc_connection *conn, 414 - struct rxrpc_host_header *hdr, 415 - gfp_t gfp) 414 + struct rxrpc_host_header *hdr) 416 415 { 417 416 struct rxrpc_call *call, *candidate; 418 417 struct rb_node **p, *parent; 419 418 u32 call_id; 420 419 421 - _enter(",%d,,%x", conn->debug_id, gfp); 420 + _enter(",%d", conn->debug_id); 422 421 423 422 ASSERT(rx != NULL); 424 423 425 - candidate = rxrpc_alloc_call(gfp); 424 + candidate = rxrpc_alloc_call(GFP_NOIO); 426 425 if (!candidate) 427 426 return ERR_PTR(-EBUSY); 428 427
+2 -3
net/rxrpc/ar-connection.c
··· 619 619 */ 620 620 struct rxrpc_connection * 621 621 rxrpc_incoming_connection(struct rxrpc_transport *trans, 622 - struct rxrpc_host_header *hdr, 623 - gfp_t gfp) 622 + struct rxrpc_host_header *hdr) 624 623 { 625 624 struct rxrpc_connection *conn, *candidate = NULL; 626 625 struct rb_node *p, **pp; ··· 658 659 659 660 /* not yet present - create a candidate for a new record and then 660 661 * redo the search */ 661 - candidate = rxrpc_alloc_connection(gfp); 662 + candidate = rxrpc_alloc_connection(GFP_NOIO); 662 663 if (!candidate) { 663 664 _leave(" = -ENOMEM"); 664 665 return ERR_PTR(-ENOMEM);
+2 -3
net/rxrpc/ar-internal.h
··· 503 503 unsigned long, int, gfp_t); 504 504 struct rxrpc_call *rxrpc_incoming_call(struct rxrpc_sock *, 505 505 struct rxrpc_connection *, 506 - struct rxrpc_host_header *, gfp_t); 506 + struct rxrpc_host_header *); 507 507 struct rxrpc_call *rxrpc_find_server_call(struct rxrpc_sock *, unsigned long); 508 508 void rxrpc_release_call(struct rxrpc_call *); 509 509 void rxrpc_release_calls_on_socket(struct rxrpc_sock *); ··· 528 528 struct rxrpc_connection *rxrpc_find_connection(struct rxrpc_transport *, 529 529 struct rxrpc_host_header *); 530 530 extern struct rxrpc_connection * 531 - rxrpc_incoming_connection(struct rxrpc_transport *, struct rxrpc_host_header *, 532 - gfp_t); 531 + rxrpc_incoming_connection(struct rxrpc_transport *, struct rxrpc_host_header *); 533 532 534 533 /* 535 534 * ar-connevent.c