Commit 98b86145 authored by Neil Brown's avatar Neil Brown Committed by Linus Torvalds

[PATCH] kNFSd: exp_getclient, now just a small wrapper, goes in favour of auth_unix_lookup

parent 00ef0ed7
......@@ -557,19 +557,6 @@ exp_pseudoroot(struct auth_domain *clp, struct svc_fh *fhp)
return fh_compose(fhp, exp, exp->ex_dentry, NULL);
}
/*
* Find a valid client given an inet address. We always move the most
* recently used client to the front of the hash chain to speed up
* future lookups.
* Locking against other processes is the responsibility of the caller.
*/
svc_client *
exp_getclient(struct sockaddr_in *sin)
{
return auth_unix_lookup(sin->sin_addr);
}
/* Iterator */
static void *e_start(struct seq_file *m, loff_t *pos)
......
......@@ -246,7 +246,7 @@ static ssize_t write_getfs(struct file *file, const char *buf, size_t size)
return -ENOMEM;
memset(res, 0, sizeof(struct knfsd_fh));
exp_readlock();
if (!(clp = exp_getclient(sin)))
if (!(clp = auth_unix_lookup(sin->sin_addr)))
err = -EPERM;
else {
err = exp_rootfh(clp, data.gd_path, res, data.gd_maxlen);
......@@ -293,7 +293,7 @@ static ssize_t write_getfd(struct file *file, const char *buf, size_t size)
return -ENOMEM;
sin = (struct sockaddr_in *)&data.gd_addr;
exp_readlock();
if (!(clp = exp_getclient(sin)))
if (!(clp = auth_unix_lookup(sin->sin_addr)))
err = -EPERM;
else {
err = exp_rootfh(clp, data.gd_path, &fh, NFS_FHSIZE);
......
......@@ -85,7 +85,6 @@ void nfsd_export_init(void);
void nfsd_export_shutdown(void);
void exp_readlock(void);
void exp_readunlock(void);
struct auth_domain * exp_getclient(struct sockaddr_in *sin);
struct svc_expkey * exp_find_key(struct auth_domain *clp,
int fsid_type, u32 *fsidv);
struct svc_export * exp_get_by_name(struct auth_domain *clp,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment