Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 372171
b: refs/heads/master
c: 0eb6f20
h: refs/heads/master
i:
  372169: 9d49432
  372167: e208a65
v: v3
  • Loading branch information
J. Bruce Fields committed Apr 3, 2013
1 parent c9405c8 commit 1c955ed
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 16 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: 78389046f733564d5c2c94f0b8d6ff0cdae951d9
refs/heads/master: 0eb6f20aa532b0c16849d627926c2ad3fe2f1cdf
21 changes: 6 additions & 15 deletions trunk/fs/nfsd/nfs4state.c
Original file line number Diff line number Diff line change
Expand Up @@ -3282,16 +3282,6 @@ static inline __be32 nfs4_check_fh(struct svc_fh *fhp, struct nfs4_ol_stateid *s
return nfs_ok;
}

static int
STALE_STATEID(stateid_t *stateid, struct nfsd_net *nn)
{
if (stateid->si_opaque.so_clid.cl_boot == nn->boot_time)
return 0;
dprintk("NFSD: stale stateid " STATEID_FMT "!\n",
STATEID_VAL(stateid));
return 1;
}

static inline int
access_permit_read(struct nfs4_ol_stateid *stp)
{
Expand Down Expand Up @@ -3422,19 +3412,20 @@ static __be32 nfsd4_lookup_stateid(stateid_t *stateid, unsigned char typemask,
struct nfsd_net *nn)
{
struct nfs4_client *cl;
__be32 status;

if (ZERO_STATEID(stateid) || ONE_STATEID(stateid))
return nfserr_bad_stateid;
if (STALE_STATEID(stateid, nn))
status = lookup_clientid(&stateid->si_opaque.so_clid, sessions,
nn, &cl);
if (status == nfserr_stale_clientid)
return nfserr_stale_stateid;
cl = find_confirmed_client(&stateid->si_opaque.so_clid, sessions, nn);
if (!cl)
return nfserr_expired;
if (status)
return status;
*s = find_stateid_by_type(cl, stateid, typemask);
if (!*s)
return nfserr_bad_stateid;
return nfs_ok;

}

/*
Expand Down

0 comments on commit 1c955ed

Please sign in to comment.