Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 267158
b: refs/heads/master
c: 97b7e3b
h: refs/heads/master
v: v3
  • Loading branch information
J. Bruce Fields committed Sep 13, 2011
1 parent 810a784 commit 384a1ed
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 19 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: f459e4535904e16ca9f0cc202c78345c332bbbad
refs/heads/master: 97b7e3b6d4ae838694b43f66b4f0b32b5ec7635b
34 changes: 16 additions & 18 deletions trunk/fs/nfsd/nfs4state.c
Original file line number Diff line number Diff line change
Expand Up @@ -3261,28 +3261,26 @@ static int is_delegation_stateid(stateid_t *stateid)

__be32 nfs4_validate_stateid(stateid_t *stateid, bool has_session)
{
struct nfs4_ol_stateid *stp = NULL;
__be32 status = nfserr_stale_stateid;
struct nfs4_stid *s;
struct nfs4_ol_stateid *ols;
__be32 status;

if (STALE_STATEID(stateid))
goto out;

status = nfserr_expired;
stp = find_ol_stateid(stateid);
if (!stp)
goto out;
status = nfserr_bad_stateid;
if (stp->st_stateowner->so_is_open_owner
&& !openowner(stp->st_stateowner)->oo_confirmed)
goto out;
return nfserr_stale_stateid;

status = check_stateid_generation(stateid, &stp->st_stid.sc_stateid, has_session);
s = find_stateid(stateid);
if (!s)
return nfserr_stale_stateid;
status = check_stateid_generation(stateid, &s->sc_stateid, has_session);
if (status)
goto out;

status = nfs_ok;
out:
return status;
return status;
if (!(s->sc_type & (NFS4_OPEN_STID | NFS4_LOCK_STID)))
return nfs_ok;
ols = openlockstateid(s);
if (ols->st_stateowner->so_is_open_owner
&& !openowner(ols->st_stateowner)->oo_confirmed)
return nfserr_bad_stateid;
return nfs_ok;
}

/*
Expand Down

0 comments on commit 384a1ed

Please sign in to comment.