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
13437e12
Commit
13437e12
authored
Jul 06, 2007
by
Trond Myklebust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NFSv4: Support recalling delegations by stateid part 2
Signed-off-by:
Trond Myklebust
<
Trond.Myklebust@netapp.com
>
parent
90163027
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
8 deletions
+6
-8
fs/nfs/delegation.c
fs/nfs/delegation.c
+1
-1
fs/nfs/delegation.h
fs/nfs/delegation.h
+1
-1
fs/nfs/nfs4proc.c
fs/nfs/nfs4proc.c
+4
-6
No files found.
fs/nfs/delegation.c
View file @
13437e12
...
...
@@ -76,7 +76,7 @@ static void nfs_delegation_claim_opens(struct inode *inode, const nfs4_stateid *
continue
;
get_nfs_open_context
(
ctx
);
spin_unlock
(
&
inode
->
i_lock
);
err
=
nfs4_open_delegation_recall
(
ctx
,
state
);
err
=
nfs4_open_delegation_recall
(
ctx
,
state
,
stateid
);
if
(
err
>=
0
)
err
=
nfs_delegation_claim_locks
(
ctx
,
state
);
put_nfs_open_context
(
ctx
);
...
...
fs/nfs/delegation.h
View file @
13437e12
...
...
@@ -39,7 +39,7 @@ void nfs_delegation_reap_unclaimed(struct nfs_client *clp);
/* NFSv4 delegation-related procedures */
int
nfs4_proc_delegreturn
(
struct
inode
*
inode
,
struct
rpc_cred
*
cred
,
const
nfs4_stateid
*
stateid
);
int
nfs4_open_delegation_recall
(
struct
nfs_open_context
*
ctx
,
struct
nfs4_state
*
state
);
int
nfs4_open_delegation_recall
(
struct
nfs_open_context
*
ctx
,
struct
nfs4_state
*
state
,
const
nfs4_stateid
*
stateid
);
int
nfs4_lock_delegation_recall
(
struct
nfs4_state
*
state
,
struct
file_lock
*
fl
);
int
nfs4_copy_delegation_stateid
(
nfs4_stateid
*
dst
,
struct
inode
*
inode
);
...
...
fs/nfs/nfs4proc.c
View file @
13437e12
...
...
@@ -510,32 +510,30 @@ static int nfs4_open_reclaim(struct nfs4_state_owner *sp, struct nfs4_state *sta
return
ret
;
}
static
int
_nfs4_open_delegation_recall
(
struct
nfs_open_context
*
ctx
,
struct
nfs4_state
*
state
)
static
int
_nfs4_open_delegation_recall
(
struct
nfs_open_context
*
ctx
,
struct
nfs4_state
*
state
,
const
nfs4_stateid
*
stateid
)
{
struct
nfs4_state_owner
*
sp
=
state
->
owner
;
struct
nfs4_opendata
*
opendata
;
int
ret
;
if
(
!
test_bit
(
NFS_DELEGATED_STATE
,
&
state
->
flags
))
return
0
;
opendata
=
nfs4_opendata_alloc
(
&
ctx
->
path
,
sp
,
0
,
NULL
);
if
(
opendata
==
NULL
)
return
-
ENOMEM
;
opendata
->
o_arg
.
claim
=
NFS4_OPEN_CLAIM_DELEGATE_CUR
;
memcpy
(
opendata
->
o_arg
.
u
.
delegation
.
data
,
state
->
stateid
.
data
,
memcpy
(
opendata
->
o_arg
.
u
.
delegation
.
data
,
state
id
->
data
,
sizeof
(
opendata
->
o_arg
.
u
.
delegation
.
data
));
ret
=
nfs4_open_recover
(
opendata
,
state
);
nfs4_opendata_put
(
opendata
);
return
ret
;
}
int
nfs4_open_delegation_recall
(
struct
nfs_open_context
*
ctx
,
struct
nfs4_state
*
state
)
int
nfs4_open_delegation_recall
(
struct
nfs_open_context
*
ctx
,
struct
nfs4_state
*
state
,
const
nfs4_stateid
*
stateid
)
{
struct
nfs4_exception
exception
=
{
};
struct
nfs_server
*
server
=
NFS_SERVER
(
state
->
inode
);
int
err
;
do
{
err
=
_nfs4_open_delegation_recall
(
ctx
,
state
);
err
=
_nfs4_open_delegation_recall
(
ctx
,
state
,
stateid
);
switch
(
err
)
{
case
0
:
return
err
;
...
...
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