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
fe650407
Commit
fe650407
authored
Jan 03, 2006
by
Trond Myklebust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NFSv4: Make DELEGRETURN an interruptible operation.
Signed-off-by:
Trond Myklebust
<
Trond.Myklebust@netapp.com
>
parent
a5d16a4d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
60 additions
and
8 deletions
+60
-8
fs/nfs/nfs4proc.c
fs/nfs/nfs4proc.c
+60
-8
No files found.
fs/nfs/nfs4proc.c
View file @
fe650407
...
@@ -2885,19 +2885,71 @@ nfs4_proc_setclientid_confirm(struct nfs4_client *clp)
...
@@ -2885,19 +2885,71 @@ nfs4_proc_setclientid_confirm(struct nfs4_client *clp)
return
status
;
return
status
;
}
}
static
int
_nfs4_proc_delegreturn
(
struct
inode
*
inode
,
struct
rpc_cred
*
cred
,
const
nfs4_stateid
*
stateid
)
struct
nfs4_delegreturndata
{
struct
nfs4_delegreturnargs
args
;
struct
nfs_fh
fh
;
nfs4_stateid
stateid
;
struct
rpc_cred
*
cred
;
int
rpc_status
;
};
static
void
nfs4_delegreturn_prepare
(
struct
rpc_task
*
task
,
void
*
calldata
)
{
{
struct
nfs4_delegreturnargs
args
=
{
struct
nfs4_delegreturndata
*
data
=
calldata
;
.
fhandle
=
NFS_FH
(
inode
),
.
stateid
=
stateid
,
};
struct
rpc_message
msg
=
{
struct
rpc_message
msg
=
{
.
rpc_proc
=
&
nfs4_procedures
[
NFSPROC4_CLNT_DELEGRETURN
],
.
rpc_proc
=
&
nfs4_procedures
[
NFSPROC4_CLNT_DELEGRETURN
],
.
rpc_argp
=
&
args
,
.
rpc_argp
=
&
data
->
args
,
.
rpc_cred
=
cred
,
.
rpc_cred
=
data
->
cred
,
};
};
rpc_call_setup
(
task
,
&
msg
,
0
);
}
return
rpc_call_sync
(
NFS_CLIENT
(
inode
),
&
msg
,
0
);
static
void
nfs4_delegreturn_done
(
struct
rpc_task
*
task
,
void
*
calldata
)
{
struct
nfs4_delegreturndata
*
data
=
calldata
;
data
->
rpc_status
=
task
->
tk_status
;
}
static
void
nfs4_delegreturn_release
(
void
*
calldata
)
{
struct
nfs4_delegreturndata
*
data
=
calldata
;
put_rpccred
(
data
->
cred
);
kfree
(
calldata
);
}
const
static
struct
rpc_call_ops
nfs4_delegreturn_ops
=
{
.
rpc_call_prepare
=
nfs4_delegreturn_prepare
,
.
rpc_call_done
=
nfs4_delegreturn_done
,
.
rpc_release
=
nfs4_delegreturn_release
,
};
static
int
_nfs4_proc_delegreturn
(
struct
inode
*
inode
,
struct
rpc_cred
*
cred
,
const
nfs4_stateid
*
stateid
)
{
struct
nfs4_delegreturndata
*
data
;
struct
rpc_task
*
task
;
int
status
;
data
=
kmalloc
(
sizeof
(
*
data
),
GFP_KERNEL
);
if
(
data
==
NULL
)
return
-
ENOMEM
;
data
->
args
.
fhandle
=
&
data
->
fh
;
data
->
args
.
stateid
=
&
data
->
stateid
;
nfs_copy_fh
(
&
data
->
fh
,
NFS_FH
(
inode
));
memcpy
(
&
data
->
stateid
,
stateid
,
sizeof
(
data
->
stateid
));
data
->
cred
=
get_rpccred
(
cred
);
data
->
rpc_status
=
0
;
task
=
rpc_run_task
(
NFS_CLIENT
(
inode
),
RPC_TASK_ASYNC
,
&
nfs4_delegreturn_ops
,
data
);
if
(
IS_ERR
(
task
))
{
nfs4_delegreturn_release
(
data
);
return
PTR_ERR
(
task
);
}
status
=
nfs4_wait_for_completion_rpc_task
(
task
);
if
(
status
==
0
)
status
=
data
->
rpc_status
;
rpc_release_task
(
task
);
return
status
;
}
}
int
nfs4_proc_delegreturn
(
struct
inode
*
inode
,
struct
rpc_cred
*
cred
,
const
nfs4_stateid
*
stateid
)
int
nfs4_proc_delegreturn
(
struct
inode
*
inode
,
struct
rpc_cred
*
cred
,
const
nfs4_stateid
*
stateid
)
...
...
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