Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 217187
b: refs/heads/master
c: 9449925
h: refs/heads/master
i:
  217185: 87e20da
  217183: 763f3c4
v: v3
  • Loading branch information
Alexandros Batsakis authored and Trond Myklebust committed Oct 24, 2010
1 parent 637b77b commit 4eabf66
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 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: c772567d97fa0fca454eea68aeae915ca1bc732b
refs/heads/master: 9449925273933d19235d7d36c1fd970841d055de
8 changes: 4 additions & 4 deletions trunk/fs/nfs/callback_proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,11 @@ int nfs41_validate_delegation_stateid(struct nfs_delegation *delegation, const n
if (delegation == NULL)
return 0;

/* seqid is 4-bytes long */
if (((u32 *) &stateid->data)[0] != 0)
if (stateid->stateid.seqid != 0)
return 0;
if (memcmp(&delegation->stateid.data[4], &stateid->data[4],
sizeof(stateid->data)-4))
if (memcmp(&delegation->stateid.stateid.other,
&stateid->stateid.other,
NFS4_STATEID_OTHER_SIZE))
return 0;

return 1;
Expand Down
15 changes: 13 additions & 2 deletions trunk/include/linux/nfs4.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@

#define NFS4_BITMAP_SIZE 2
#define NFS4_VERIFIER_SIZE 8
#define NFS4_STATEID_SIZE 16
#define NFS4_STATEID_SEQID_SIZE 4
#define NFS4_STATEID_OTHER_SIZE 12
#define NFS4_STATEID_SIZE (NFS4_STATEID_SEQID_SIZE + NFS4_STATEID_OTHER_SIZE)
#define NFS4_FHSIZE 128
#define NFS4_MAXPATHLEN PATH_MAX
#define NFS4_MAXNAMLEN NAME_MAX
Expand Down Expand Up @@ -167,7 +169,16 @@ struct nfs4_acl {
};

typedef struct { char data[NFS4_VERIFIER_SIZE]; } nfs4_verifier;
typedef struct { char data[NFS4_STATEID_SIZE]; } nfs4_stateid;

struct nfs41_stateid {
__be32 seqid;
char other[NFS4_STATEID_OTHER_SIZE];
} __attribute__ ((packed));

typedef union {
char data[NFS4_STATEID_SIZE];
struct nfs41_stateid stateid;
} nfs4_stateid;

enum nfs_opnum4 {
OP_ACCESS = 3,
Expand Down

0 comments on commit 4eabf66

Please sign in to comment.