Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
a601caed
Commit
a601caed
authored
Feb 22, 2009
by
J. Bruce Fields
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nfsd4: move rpc_client setup to a separate function
Signed-off-by:
J. Bruce Fields
<
bfields@citi.umich.edu
>
parent
418cd20a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
8 deletions
+21
-8
fs/nfsd/nfs4callback.c
fs/nfsd/nfs4callback.c
+21
-8
No files found.
fs/nfsd/nfs4callback.c
View file @
a601caed
...
...
@@ -361,9 +361,8 @@ static struct rpc_program cb_program = {
/* Reference counting, callback cleanup, etc., all look racy as heck.
* And why is cb_set an atomic? */
static
int
do_probe_callback
(
void
*
data
)
static
struct
rpc_clnt
*
setup_callback_client
(
struct
nfs4_client
*
clp
)
{
struct
nfs4_client
*
clp
=
data
;
struct
sockaddr_in
addr
;
struct
nfs4_callback
*
cb
=
&
clp
->
cl_callback
;
struct
rpc_timeout
timeparms
=
{
...
...
@@ -384,15 +383,10 @@ static int do_probe_callback(void *data)
.
flags
=
(
RPC_CLNT_CREATE_NOPING
|
RPC_CLNT_CREATE_QUIET
),
.
client_name
=
clp
->
cl_principal
,
};
struct
rpc_message
msg
=
{
.
rpc_proc
=
&
nfs4_cb_procedures
[
NFSPROC4_CLNT_CB_NULL
],
.
rpc_argp
=
clp
,
};
struct
rpc_clnt
*
client
;
int
status
=
-
EINVAL
;
if
(
!
clp
->
cl_principal
&&
(
clp
->
cl_flavor
>=
RPC_AUTH_GSS_KRB5
))
goto
out_err
;
return
ERR_PTR
(
-
EINVAL
)
;
/* Initialize address */
memset
(
&
addr
,
0
,
sizeof
(
addr
));
...
...
@@ -402,6 +396,25 @@ static int do_probe_callback(void *data)
/* Create RPC client */
client
=
rpc_create
(
&
args
);
if
(
IS_ERR
(
client
))
dprintk
(
"NFSD: couldn't create callback client: %ld
\n
"
,
PTR_ERR
(
client
));
return
client
;
}
static
int
do_probe_callback
(
void
*
data
)
{
struct
nfs4_client
*
clp
=
data
;
struct
nfs4_callback
*
cb
=
&
clp
->
cl_callback
;
struct
rpc_message
msg
=
{
.
rpc_proc
=
&
nfs4_cb_procedures
[
NFSPROC4_CLNT_CB_NULL
],
.
rpc_argp
=
clp
,
};
struct
rpc_clnt
*
client
;
int
status
;
client
=
setup_callback_client
(
clp
);
if
(
IS_ERR
(
client
))
{
status
=
PTR_ERR
(
client
);
dprintk
(
"NFSD: couldn't create callback client: %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