diff options
| author | Neil Brown <neilb@cse.unsw.edu.au> | 2002-09-12 01:41:36 -0700 |
|---|---|---|
| committer | David S. Miller <davem@nuts.ninka.net> | 2002-09-12 01:41:36 -0700 |
| commit | d42f56348b97fa01e99b9306ab41325728fe7863 (patch) | |
| tree | 1a7a06b38556323be878a47d16eeda83b32929a8 | |
| parent | 5488bb08136c174e7720a377d535529780cf9407 (diff) | |
[PATCH] kNFSd 9: Discard cl_addr
We currently store the address list with each
client and use it only to print out comments
on /proc/fs/nfs/exports
While these can be helpful, they are not critical and
could be added back later after we restructure the exports
table.
| -rw-r--r-- | fs/nfsd/export.c | 37 | ||||
| -rw-r--r-- | include/linux/nfsd/export.h | 2 |
2 files changed, 2 insertions, 37 deletions
diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c index 99b512d8bc2a..003e13d1c82c 100644 --- a/fs/nfsd/export.c +++ b/fs/nfsd/export.c @@ -640,7 +640,6 @@ static int e_show(struct seq_file *m, void *p) struct svc_export *exp = p; struct svc_client *clp; char *pbuf; - int j, first = 0; if (p == (void *)1) { seq_puts(m, "# Version 1.1\n"); @@ -659,31 +658,7 @@ static int e_show(struct seq_file *m, void *p) seq_putc(m, '('); exp_flags(m, exp->ex_flags, exp->ex_fsid, exp->ex_anon_uid, exp->ex_anon_gid); - seq_puts(m, ") # "); - for (j = 0; j < clp->cl_naddr; j++) { - struct svc_clnthash **hp, **head, *tmp; - struct in_addr addr = clp->cl_addr[j]; - - head = &clnt_hash[CLIENT_HASH(addr.s_addr)]; - for (hp = head; (tmp = *hp) != NULL; hp = &(tmp->h_next)) { - if (tmp->h_addr.s_addr == addr.s_addr) - break; - } - if (tmp) { - if (first++) - seq_putc(m, ' '); - if (tmp->h_client != clp) - seq_putc(m, '('); - seq_printf(m, "%d.%d.%d.%d", - htonl(addr.s_addr) >> 24 & 0xff, - htonl(addr.s_addr) >> 16 & 0xff, - htonl(addr.s_addr) >> 8 & 0xff, - htonl(addr.s_addr) >> 0 & 0xff); - if (tmp->h_client != clp) - seq_putc(m, ')'); - } - } - seq_putc(m, '\n'); + seq_puts(m, ")\n"); return 0; } @@ -751,19 +726,13 @@ exp_addclient(struct nfsctl_client *ncp) } } - /* Copy addresses. */ - for (i = 0; i < ncp->cl_naddr; i++) { - clp->cl_addr[i] = ncp->cl_addrlist[i]; - } - clp->cl_naddr = ncp->cl_naddr; - /* Remove old client hash entries. */ if (change) exp_unhashclient(clp); /* Insert client into hashtable. */ for (i = 0; i < ncp->cl_naddr; i++) { - struct in_addr addr = clp->cl_addr[i]; + struct in_addr addr = ncp->cl_addrlist[i]; int hash; hash = CLIENT_HASH(addr.s_addr); @@ -853,8 +822,6 @@ again: } } } - if (count != clp->cl_naddr) - printk(KERN_WARNING "nfsd: bad address count in freeclient!\n"); if (err) goto again; for (i = 0; i < count; i++) diff --git a/include/linux/nfsd/export.h b/include/linux/nfsd/export.h index 15da6ab2086e..654e97e5e875 100644 --- a/include/linux/nfsd/export.h +++ b/include/linux/nfsd/export.h @@ -51,8 +51,6 @@ struct svc_client { struct svc_client * cl_next; char cl_ident[NFSCLNT_IDMAX]; - int cl_naddr; - struct in_addr cl_addr[NFSCLNT_ADDRMAX]; struct list_head cl_export[NFSCLNT_EXPMAX]; struct list_head cl_expfsid[NFSCLNT_EXPMAX]; struct list_head cl_list; |
