Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
78b576ce
Commit
78b576ce
authored
Aug 28, 2018
by
Trond Myklebust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SUNRPC: Minor cleanup for call_transmit()
Signed-off-by:
Trond Myklebust
<
trond.myklebust@hammerspace.com
>
parent
7f3a1d1e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
17 deletions
+15
-17
net/sunrpc/clnt.c
net/sunrpc/clnt.c
+15
-17
No files found.
net/sunrpc/clnt.c
View file @
78b576ce
...
@@ -1946,9 +1946,7 @@ call_transmit(struct rpc_task *task)
...
@@ -1946,9 +1946,7 @@ call_transmit(struct rpc_task *task)
dprint_status
(
task
);
dprint_status
(
task
);
task
->
tk_action
=
call_status
;
task
->
tk_action
=
call_transmit_status
;
if
(
task
->
tk_status
<
0
)
return
;
/* Encode here so that rpcsec_gss can use correct sequence number. */
/* Encode here so that rpcsec_gss can use correct sequence number. */
if
(
rpc_task_need_encode
(
task
))
{
if
(
rpc_task_need_encode
(
task
))
{
rpc_xdr_encode
(
task
);
rpc_xdr_encode
(
task
);
...
@@ -1969,7 +1967,6 @@ call_transmit(struct rpc_task *task)
...
@@ -1969,7 +1967,6 @@ call_transmit(struct rpc_task *task)
if
(
!
xprt_prepare_transmit
(
task
))
if
(
!
xprt_prepare_transmit
(
task
))
return
;
return
;
task
->
tk_action
=
call_transmit_status
;
xprt_transmit
(
task
);
xprt_transmit
(
task
);
if
(
task
->
tk_status
<
0
)
if
(
task
->
tk_status
<
0
)
return
;
return
;
...
@@ -1996,19 +1993,29 @@ call_transmit_status(struct rpc_task *task)
...
@@ -1996,19 +1993,29 @@ call_transmit_status(struct rpc_task *task)
}
}
switch
(
task
->
tk_status
)
{
switch
(
task
->
tk_status
)
{
case
-
EAGAIN
:
case
-
ENOBUFS
:
break
;
default:
default:
dprint_status
(
task
);
dprint_status
(
task
);
xprt_end_transmit
(
task
);
xprt_end_transmit
(
task
);
break
;
break
;
case
-
EBADMSG
:
clear_bit
(
RPC_TASK_NEED_XMIT
,
&
task
->
tk_runstate
);
task
->
tk_action
=
call_transmit
;
task
->
tk_status
=
0
;
xprt_end_transmit
(
task
);
break
;
/*
/*
* Special cases: if we've been waiting on the
* Special cases: if we've been waiting on the
* socket's write_space() callback, or if the
* socket's write_space() callback, or if the
* socket just returned a connection error,
* socket just returned a connection error,
* then hold onto the transport lock.
* then hold onto the transport lock.
*/
*/
case
-
ENOBUFS
:
rpc_delay
(
task
,
HZ
>>
2
);
/* fall through */
case
-
EAGAIN
:
task
->
tk_action
=
call_transmit
;
task
->
tk_status
=
0
;
break
;
case
-
ECONNREFUSED
:
case
-
ECONNREFUSED
:
case
-
EHOSTDOWN
:
case
-
EHOSTDOWN
:
case
-
ENETDOWN
:
case
-
ENETDOWN
:
...
@@ -2163,22 +2170,13 @@ call_status(struct rpc_task *task)
...
@@ -2163,22 +2170,13 @@ call_status(struct rpc_task *task)
/* fall through */
/* fall through */
case
-
EPIPE
:
case
-
EPIPE
:
case
-
ENOTCONN
:
case
-
ENOTCONN
:
task
->
tk_action
=
call_bind
;
break
;
case
-
ENOBUFS
:
rpc_delay
(
task
,
HZ
>>
2
);
/* fall through */
case
-
EAGAIN
:
case
-
EAGAIN
:
task
->
tk_action
=
call_
transmit
;
task
->
tk_action
=
call_
bind
;
break
;
break
;
case
-
EIO
:
case
-
EIO
:
/* shutdown or soft timeout */
/* shutdown or soft timeout */
rpc_exit
(
task
,
status
);
rpc_exit
(
task
,
status
);
break
;
break
;
case
-
EBADMSG
:
clear_bit
(
RPC_TASK_NEED_XMIT
,
&
task
->
tk_runstate
);
task
->
tk_action
=
call_transmit
;
break
;
default:
default:
if
(
clnt
->
cl_chatty
)
if
(
clnt
->
cl_chatty
)
printk
(
"%s: RPC call returned error %d
\n
"
,
printk
(
"%s: RPC call returned error %d
\n
"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment