diff options
Diffstat (limited to 'include/linux/nfsd/export.h')
-rw-r--r-- | include/linux/nfsd/export.h | 29 |
1 files changed, 6 insertions, 23 deletions
diff --git a/include/linux/nfsd/export.h b/include/linux/nfsd/export.h index 6bad4766d3d9..d2a8abb5011a 100644 --- a/include/linux/nfsd/export.h +++ b/include/linux/nfsd/export.h | |||
@@ -67,7 +67,8 @@ struct svc_expkey { | |||
67 | int ek_fsidtype; | 67 | int ek_fsidtype; |
68 | u32 ek_fsid[3]; | 68 | u32 ek_fsid[3]; |
69 | 69 | ||
70 | struct svc_export * ek_export; | 70 | struct vfsmount * ek_mnt; |
71 | struct dentry * ek_dentry; | ||
71 | }; | 72 | }; |
72 | 73 | ||
73 | #define EX_SECURE(exp) (!((exp)->ex_flags & NFSEXP_INSECURE_PORT)) | 74 | #define EX_SECURE(exp) (!((exp)->ex_flags & NFSEXP_INSECURE_PORT)) |
@@ -85,9 +86,6 @@ void nfsd_export_shutdown(void); | |||
85 | void nfsd_export_flush(void); | 86 | void nfsd_export_flush(void); |
86 | void exp_readlock(void); | 87 | void exp_readlock(void); |
87 | void exp_readunlock(void); | 88 | void exp_readunlock(void); |
88 | struct svc_expkey * exp_find_key(struct auth_domain *clp, | ||
89 | int fsid_type, u32 *fsidv, | ||
90 | struct cache_req *reqp); | ||
91 | struct svc_export * exp_get_by_name(struct auth_domain *clp, | 89 | struct svc_export * exp_get_by_name(struct auth_domain *clp, |
92 | struct vfsmount *mnt, | 90 | struct vfsmount *mnt, |
93 | struct dentry *dentry, | 91 | struct dentry *dentry, |
@@ -101,35 +99,20 @@ int exp_rootfh(struct auth_domain *, | |||
101 | int exp_pseudoroot(struct auth_domain *, struct svc_fh *fhp, struct cache_req *creq); | 99 | int exp_pseudoroot(struct auth_domain *, struct svc_fh *fhp, struct cache_req *creq); |
102 | int nfserrno(int errno); | 100 | int nfserrno(int errno); |
103 | 101 | ||
104 | extern void expkey_put(struct cache_head *item, struct cache_detail *cd); | 102 | extern struct cache_detail svc_export_cache; |
105 | extern void svc_export_put(struct cache_head *item, struct cache_detail *cd); | ||
106 | extern struct cache_detail svc_export_cache, svc_expkey_cache; | ||
107 | 103 | ||
108 | static inline void exp_put(struct svc_export *exp) | 104 | static inline void exp_put(struct svc_export *exp) |
109 | { | 105 | { |
110 | svc_export_put(&exp->h, &svc_export_cache); | 106 | cache_put(&exp->h, &svc_export_cache); |
111 | } | 107 | } |
112 | 108 | ||
113 | static inline void exp_get(struct svc_export *exp) | 109 | static inline void exp_get(struct svc_export *exp) |
114 | { | 110 | { |
115 | cache_get(&exp->h); | 111 | cache_get(&exp->h); |
116 | } | 112 | } |
117 | static inline struct svc_export * | 113 | extern struct svc_export * |
118 | exp_find(struct auth_domain *clp, int fsid_type, u32 *fsidv, | 114 | exp_find(struct auth_domain *clp, int fsid_type, u32 *fsidv, |
119 | struct cache_req *reqp) | 115 | struct cache_req *reqp); |
120 | { | ||
121 | struct svc_expkey *ek = exp_find_key(clp, fsid_type, fsidv, reqp); | ||
122 | if (ek && !IS_ERR(ek)) { | ||
123 | struct svc_export *exp = ek->ek_export; | ||
124 | int err; | ||
125 | exp_get(exp); | ||
126 | expkey_put(&ek->h, &svc_expkey_cache); | ||
127 | if ((err = cache_check(&svc_export_cache, &exp->h, reqp))) | ||
128 | exp = ERR_PTR(err); | ||
129 | return exp; | ||
130 | } else | ||
131 | return ERR_PTR(PTR_ERR(ek)); | ||
132 | } | ||
133 | 116 | ||
134 | #endif /* __KERNEL__ */ | 117 | #endif /* __KERNEL__ */ |
135 | 118 | ||