aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/state.h
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@redhat.com>2011-10-17 11:14:48 -0400
committerJ. Bruce Fields <bfields@redhat.com>2011-10-17 17:50:07 -0400
commit996e09385c364f97a89648b401409521e2a3a094 (patch)
treeab1f76e385a3e66e070eb87e170288f99d6a1b64 /fs/nfsd/state.h
parent32513b40efdc693b3675f1c691ab901518fbcb6a (diff)
nfsd4: do idr preallocation with stateid allocation
Move idr preallocation out of stateid initialization, into stateid allocation, so that we no longer have to handle any errors from the former. This is a little subtle due to the way the idr code manages these preallocated items--document that in comments. Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/state.h')
-rw-r--r--fs/nfsd/state.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/nfsd/state.h b/fs/nfsd/state.h
index eab9dae23c06..1a5820066040 100644
--- a/fs/nfsd/state.h
+++ b/fs/nfsd/state.h
@@ -85,6 +85,7 @@ struct nfs4_stid {
85}; 85};
86 86
87struct nfs4_delegation { 87struct nfs4_delegation {
88 struct nfs4_stid dl_stid; /* must be first field */
88 struct list_head dl_perfile; 89 struct list_head dl_perfile;
89 struct list_head dl_perclnt; 90 struct list_head dl_perclnt;
90 struct list_head dl_recall_lru; /* delegation recalled */ 91 struct list_head dl_recall_lru; /* delegation recalled */
@@ -93,7 +94,6 @@ struct nfs4_delegation {
93 u32 dl_type; 94 u32 dl_type;
94 time_t dl_time; 95 time_t dl_time;
95/* For recall: */ 96/* For recall: */
96 struct nfs4_stid dl_stid;
97 struct knfsd_fh dl_fh; 97 struct knfsd_fh dl_fh;
98 int dl_retries; 98 int dl_retries;
99 struct nfsd4_callback dl_recall; 99 struct nfsd4_callback dl_recall;
@@ -434,7 +434,7 @@ static inline struct file *find_any_file(struct nfs4_file *f)
434 434
435/* "ol" stands for "Open or Lock". Better suggestions welcome. */ 435/* "ol" stands for "Open or Lock". Better suggestions welcome. */
436struct nfs4_ol_stateid { 436struct nfs4_ol_stateid {
437 struct nfs4_stid st_stid; 437 struct nfs4_stid st_stid; /* must be first field */
438 struct list_head st_perfile; 438 struct list_head st_perfile;
439 struct list_head st_perstateowner; 439 struct list_head st_perstateowner;
440 struct list_head st_lockowners; 440 struct list_head st_lockowners;