]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
rxrpc: Don't pass gfp around in incoming call handling functions
authorDavid Howells <dhowells@redhat.com>
Thu, 7 Apr 2016 16:23:37 +0000 (17:23 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 11 Apr 2016 19:34:41 +0000 (15:34 -0400)
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>
net/rxrpc/ar-accept.c
net/rxrpc/ar-call.c
net/rxrpc/ar-connection.c
net/rxrpc/ar-internal.h

index 277731a5e67a523988673d5f7dccfc8de6ac47a8..e7a7f05f13e2b0b39d921cf312e9a6aeb6599571 100644 (file)
@@ -108,7 +108,7 @@ static int rxrpc_accept_incoming_call(struct rxrpc_local *local,
                goto error;
        }
 
-       conn = rxrpc_incoming_connection(trans, &sp->hdr, GFP_NOIO);
+       conn = rxrpc_incoming_connection(trans, &sp->hdr);
        rxrpc_put_transport(trans);
        if (IS_ERR(conn)) {
                _debug("no conn");
@@ -116,7 +116,7 @@ static int rxrpc_accept_incoming_call(struct rxrpc_local *local,
                goto error;
        }
 
-       call = rxrpc_incoming_call(rx, conn, &sp->hdr, GFP_NOIO);
+       call = rxrpc_incoming_call(rx, conn, &sp->hdr);
        rxrpc_put_connection(conn);
        if (IS_ERR(call)) {
                _debug("no call");
index 67a211f0ebbaeb307404ebd477fcf0ffc2a33c8f..571a41fd5a324705a30e78304833b39c8c501380 100644 (file)
@@ -411,18 +411,17 @@ found_extant_second:
  */
 struct rxrpc_call *rxrpc_incoming_call(struct rxrpc_sock *rx,
                                       struct rxrpc_connection *conn,
-                                      struct rxrpc_host_header *hdr,
-                                      gfp_t gfp)
+                                      struct rxrpc_host_header *hdr)
 {
        struct rxrpc_call *call, *candidate;
        struct rb_node **p, *parent;
        u32 call_id;
 
-       _enter(",%d,,%x", conn->debug_id, gfp);
+       _enter(",%d", conn->debug_id);
 
        ASSERT(rx != NULL);
 
-       candidate = rxrpc_alloc_call(gfp);
+       candidate = rxrpc_alloc_call(GFP_NOIO);
        if (!candidate)
                return ERR_PTR(-EBUSY);
 
index 9942da1edbf6c00a4f5acee07de7c0c92069f121..9b6966777633efc7925529a50cd928c260dd706c 100644 (file)
@@ -619,8 +619,7 @@ interrupted:
  */
 struct rxrpc_connection *
 rxrpc_incoming_connection(struct rxrpc_transport *trans,
-                         struct rxrpc_host_header *hdr,
-                         gfp_t gfp)
+                         struct rxrpc_host_header *hdr)
 {
        struct rxrpc_connection *conn, *candidate = NULL;
        struct rb_node *p, **pp;
@@ -659,7 +658,7 @@ rxrpc_incoming_connection(struct rxrpc_transport *trans,
 
        /* not yet present - create a candidate for a new record and then
         * redo the search */
-       candidate = rxrpc_alloc_connection(gfp);
+       candidate = rxrpc_alloc_connection(GFP_NOIO);
        if (!candidate) {
                _leave(" = -ENOMEM");
                return ERR_PTR(-ENOMEM);
index 258b74a2a23fb0875a498bbd688f7a92fe17880f..d38071b09f7220b09cc0aa706883e4729629883c 100644 (file)
@@ -503,7 +503,7 @@ struct rxrpc_call *rxrpc_get_client_call(struct rxrpc_sock *,
                                         unsigned long, int, gfp_t);
 struct rxrpc_call *rxrpc_incoming_call(struct rxrpc_sock *,
                                       struct rxrpc_connection *,
-                                      struct rxrpc_host_header *, gfp_t);
+                                      struct rxrpc_host_header *);
 struct rxrpc_call *rxrpc_find_server_call(struct rxrpc_sock *, unsigned long);
 void rxrpc_release_call(struct rxrpc_call *);
 void rxrpc_release_calls_on_socket(struct rxrpc_sock *);
@@ -528,8 +528,7 @@ void __exit rxrpc_destroy_all_connections(void);
 struct rxrpc_connection *rxrpc_find_connection(struct rxrpc_transport *,
                                               struct rxrpc_host_header *);
 extern struct rxrpc_connection *
-rxrpc_incoming_connection(struct rxrpc_transport *, struct rxrpc_host_header *,
-                         gfp_t);
+rxrpc_incoming_connection(struct rxrpc_transport *, struct rxrpc_host_header *);
 
 /*
  * ar-connevent.c