projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
272289a
)
NFSv4: Don't test open_stateid unless it is set
author
Trond Myklebust
<
[email protected]
>
Thu, 22 Sep 2016 17:39:16 +0000
(13:39 -0400)
committer
Anna Schumaker
<
[email protected]
>
Tue, 27 Sep 2016 18:35:11 +0000
(14:35 -0400)
We need to test the NFS_OPEN_STATE flag for whether or not the
open_stateid is valid.
Signed-off-by: Trond Myklebust <
[email protected]
>
Tested-by: Oleg Drokin <
[email protected]
>
Signed-off-by: Anna Schumaker <
[email protected]
>
fs/nfs/nfs4proc.c
patch
|
blob
|
history
diff --git
a/fs/nfs/nfs4proc.c
b/fs/nfs/nfs4proc.c
index 409b9fa2b84471973a21aafdc5eba49bb2f09b6d..6f0df2c8846c3644231d65197b6e2397c97df46d 100644
(file)
--- a/
fs/nfs/nfs4proc.c
+++ b/
fs/nfs/nfs4proc.c
@@
-2587,6
+2587,11
@@
static int nfs41_check_open_stateid(struct nfs4_state *state)
struct rpc_cred *cred = state->owner->so_cred;
int status;
+ if (test_bit(NFS_OPEN_STATE, &state->flags) == 0) {
+ if (test_bit(NFS_DELEGATED_STATE, &state->flags) == 0)
+ return NFS_OK;
+ return -NFS4ERR_BAD_STATEID;
+ }
/* If a state reset has been done, test_stateid is unneeded */
if ((test_bit(NFS_O_RDONLY_STATE, &state->flags) == 0) &&
(test_bit(NFS_O_WRONLY_STATE, &state->flags) == 0) &&