Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1373522

[PATCH 6/9] rxrpc: Don't pass gfp around in incoming call handling functions

From David Howells <dhowells@redhat.com>
Newsgroups linux.kernel
Subject [PATCH 6/9] rxrpc: Don't pass gfp around in incoming call handling functions
Date 2016-04-07 18:30 +0200
Message-ID <rlkYG-6F9-21@gated-at.bofh.it> (permalink)
References <rlkYG-6F9-9@gated-at.bofh.it>
Organization Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903

Show all headers | View raw


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>
---

 net/rxrpc/ar-accept.c     |    4 ++--
 net/rxrpc/ar-call.c       |    7 +++----
 net/rxrpc/ar-connection.c |    5 ++---
 net/rxrpc/ar-internal.h   |    5 ++---
 4 files changed, 9 insertions(+), 12 deletions(-)

diff --git a/net/rxrpc/ar-accept.c b/net/rxrpc/ar-accept.c
index 277731a5e67a..e7a7f05f13e2 100644
--- a/net/rxrpc/ar-accept.c
+++ b/net/rxrpc/ar-accept.c
@@ -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");
diff --git a/net/rxrpc/ar-call.c b/net/rxrpc/ar-call.c
index 67a211f0ebba..571a41fd5a32 100644
--- a/net/rxrpc/ar-call.c
+++ b/net/rxrpc/ar-call.c
@@ -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);
 
diff --git a/net/rxrpc/ar-connection.c b/net/rxrpc/ar-connection.c
index 9942da1edbf6..9b6966777633 100644
--- a/net/rxrpc/ar-connection.c
+++ b/net/rxrpc/ar-connection.c
@@ -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);
diff --git a/net/rxrpc/ar-internal.h b/net/rxrpc/ar-internal.h
index 258b74a2a23f..d38071b09f72 100644
--- a/net/rxrpc/ar-internal.h
+++ b/net/rxrpc/ar-internal.h
@@ -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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/9] RxRPC: 2nd rewrite part 1 David Howells <dhowells@redhat.com> - 2016-04-07 18:30 +0200
  [PATCH 6/9] rxrpc: Don't pass gfp around in incoming call handling  functions David Howells <dhowells@redhat.com> - 2016-04-07 18:30 +0200
  [PATCH 2/9] rxrpc: Disable a debugging statement that has been left  enabled. David Howells <dhowells@redhat.com> - 2016-04-07 18:30 +0200
    Re: [PATCH 2/9] rxrpc: Disable a debugging statement that has been  left enabled. Joe Perches <joe@perches.com> - 2016-04-07 18:40 +0200
      Re: [PATCH 2/9] rxrpc: Disable a debugging statement that has been left enabled. David Howells <dhowells@redhat.com> - 2016-04-07 19:10 +0200
        Re: [PATCH 2/9] rxrpc: Disable a debugging statement that has been  left enabled. Joe Perches <joe@perches.com> - 2016-04-07 19:20 +0200
          Re: [PATCH 2/9] rxrpc: Disable a debugging statement that has been left enabled. David Howells <dhowells@redhat.com> - 2016-04-07 21:50 +0200
            Re: [PATCH 2/9] rxrpc: Disable a debugging statement that has been  left enabled. Joe Perches <joe@perches.com> - 2016-04-07 22:30 +0200
              Re: [PATCH 2/9] rxrpc: Disable a debugging statement that has been left enabled. David Howells <dhowells@redhat.com> - 2016-04-07 22:50 +0200
      Re: [PATCH 2/9] rxrpc: Disable a debugging statement that has been  left enabled. David Miller <davem@davemloft.net> - 2016-04-07 19:40 +0200
        Re: [PATCH 2/9] rxrpc: Disable a debugging statement that has been left enabled. David Howells <dhowells@redhat.com> - 2016-04-07 21:50 +0200
          Re: [PATCH 2/9] rxrpc: Disable a debugging statement that has been  left enabled. David Miller <davem@davemloft.net> - 2016-04-07 22:40 +0200
            Re: [PATCH 2/9] rxrpc: Disable a debugging statement that has been left enabled. David Howells <dhowells@redhat.com> - 2016-04-07 22:50 +0200
              Re: [PATCH 2/9] rxrpc: Disable a debugging statement that has been  left enabled. David Miller <davem@davemloft.net> - 2016-04-07 23:00 +0200
                Re: [PATCH 2/9] rxrpc: Disable a debugging statement that has been left enabled. David Howells <dhowells@redhat.com> - 2016-04-07 23:30 +0200
  [PATCH 4/9] rxrpc: Static arrays of strings should be const char  *const[] David Howells <dhowells@redhat.com> - 2016-04-07 18:30 +0200
  [PATCH 5/9] rxrpc: Differentiate local and remote abort codes in  structs David Howells <dhowells@redhat.com> - 2016-04-07 18:30 +0200
  [PATCH 1/9] afs: Wait for outstanding async calls before closing  rxrpc socket David Howells <dhowells@redhat.com> - 2016-04-07 18:30 +0200
  [PATCH 9/9] rxrpc: Create a null security type and get rid of  conditional calls David Howells <dhowells@redhat.com> - 2016-04-07 18:30 +0200
  Re: [PATCH 0/9] RxRPC: 2nd rewrite part 1 David Miller <davem@davemloft.net> - 2016-04-11 21:40 +0200
    Re: [PATCH 0/9] RxRPC: 2nd rewrite part 1 David Howells <dhowells@redhat.com> - 2016-04-11 22:40 +0200
    Re: [PATCH 0/9] RxRPC: 2nd rewrite part 1 David Howells <dhowells@redhat.com> - 2016-04-12 00:10 +0200
      Re: [PATCH 0/9] RxRPC: 2nd rewrite part 1 David Howells <dhowells@redhat.com> - 2016-04-12 00:40 +0200
      Re: [PATCH 0/9] RxRPC: 2nd rewrite part 1 David Miller <davem@davemloft.net> - 2016-04-12 03:30 +0200

csiph-web