Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 372197
b: refs/heads/master
c: 2334003
h: refs/heads/master
i:
  372195: 96fbc8c
v: v3
  • Loading branch information
J. Bruce Fields committed Apr 9, 2013
1 parent 6dca4e8 commit 06f2966
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 06b332a52293a45324320b6b446a7fa677fb6702
refs/heads/master: 23340032e64d70ce76817a88e8193c8040b095cf
19 changes: 14 additions & 5 deletions trunk/fs/nfsd/nfs4state.c
Original file line number Diff line number Diff line change
Expand Up @@ -3456,13 +3456,22 @@ static __be32 nfsd4_validate_stateid(struct nfs4_client *cl, stateid_t *stateid)
status = check_stateid_generation(stateid, &s->sc_stateid, 1);
if (status)
return status;
if (!(s->sc_type & (NFS4_OPEN_STID | NFS4_LOCK_STID)))
switch (s->sc_type) {
case NFS4_DELEG_STID:
return nfs_ok;
case NFS4_OPEN_STID:
case NFS4_LOCK_STID:
ols = openlockstateid(s);
if (ols->st_stateowner->so_is_open_owner
&& !(openowner(ols->st_stateowner)->oo_flags
& NFS4_OO_CONFIRMED))
return nfserr_bad_stateid;
return nfs_ok;
ols = openlockstateid(s);
if (ols->st_stateowner->so_is_open_owner
&& !(openowner(ols->st_stateowner)->oo_flags & NFS4_OO_CONFIRMED))
default:
printk("unknown stateid type %x\n", s->sc_type);
case NFS4_CLOSED_STID:
return nfserr_bad_stateid;
return nfs_ok;
}
}

static __be32 nfsd4_lookup_stateid(stateid_t *stateid, unsigned char typemask,
Expand Down

0 comments on commit 06f2966

Please sign in to comment.