diff options
| author | Neil Brown <neilb@cse.unsw.edu.au> | 2002-09-12 01:42:59 -0700 |
|---|---|---|
| committer | David S. Miller <davem@nuts.ninka.net> | 2002-09-12 01:42:59 -0700 |
| commit | 981d3487f7b5a57e94a789e7a129f054fd7ad628 (patch) | |
| tree | 24ff5225346bd80698398dd4a3375a340f8daf9f /include/linux | |
| parent | 6d0f7b032671093abcfbecca145e0152cb2e6bb3 (diff) | |
[PATCH] kNFSd 14: Filehandle lookup makes use of new export table structure.
Filehandle lookup currently breaks out the interesting pieces of
a filehandle and passes them to exp_get or exp_get_fsid, which put the
pieces back into a filehandle fragment.
We define a new interface "exp_find" which does a lookup based on
a filehandle fragment to avoid this double handling.
In the process, common code in exp_get_key and exp_get_fsid_key is united
into exp_find_key.
Also, filehandle composition now uses the mk_fsid_v? inline functions.
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/nfsd/export.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/include/linux/nfsd/export.h b/include/linux/nfsd/export.h index 97592dbe9a4b..d6a346aef097 100644 --- a/include/linux/nfsd/export.h +++ b/include/linux/nfsd/export.h @@ -98,8 +98,7 @@ void exp_readlock(void); void exp_readunlock(void); struct svc_client * exp_getclient(struct sockaddr_in *sin); void exp_putclient(struct svc_client *clp); -struct svc_export * exp_get(struct svc_client *clp, dev_t dev, ino_t ino); -struct svc_export * exp_get_fsid(struct svc_client *clp, int fsid); +struct svc_expkey * exp_find_key(struct svc_client *clp, int fsid_type, u32 *fsidv); struct svc_export * exp_get_by_name(struct svc_client *clp, struct vfsmount *mnt, struct dentry *dentry); @@ -109,6 +108,15 @@ int exp_rootfh(struct svc_client *, char *path, struct knfsd_fh *, int maxsize); int nfserrno(int errno); +static inline struct svc_export * +exp_find(struct svc_client *clp, int fsid_type, u32 *fsidv) +{ + struct svc_expkey *ek = exp_find_key(clp, fsid_type, fsidv); + if (ek) + return ek->ek_export; + else + return NULL; +} #endif /* __KERNEL__ */ |
