diff options
Diffstat (limited to 'include/linux/sunrpc')
| -rw-r--r-- | include/linux/sunrpc/cache.h | 7 | ||||
| -rw-r--r-- | include/linux/sunrpc/svcauth.h | 8 |
2 files changed, 13 insertions, 2 deletions
diff --git a/include/linux/sunrpc/cache.h b/include/linux/sunrpc/cache.h index 74e53a04907e..a3cdc080dd85 100644 --- a/include/linux/sunrpc/cache.h +++ b/include/linux/sunrpc/cache.h @@ -78,6 +78,11 @@ struct cache_detail { int (*cache_parse)(struct cache_detail *, char *buf, int len); + int (*cache_show)(struct seq_file *m, + struct cache_detail *cd, + struct cache_head *h, + char *pbuf); + /* fields below this comment are for internal use * and should not be touched by cache owners */ @@ -171,7 +176,7 @@ RTN *FNAME ARGS \ if (!new) break; \ \ new->MEMBER.next = tmp->MEMBER.next; \ - *head = &new->MEMBER; \ + *hp = &new->MEMBER; \ tmp->MEMBER.next = NULL; \ set_bit(CACHE_HASHED, &new->MEMBER.flags); \ clear_bit(CACHE_HASHED, &tmp->MEMBER.flags); \ diff --git a/include/linux/sunrpc/svcauth.h b/include/linux/sunrpc/svcauth.h index 9c6bf43a26b8..95a45edc2f99 100644 --- a/include/linux/sunrpc/svcauth.h +++ b/include/linux/sunrpc/svcauth.h @@ -11,8 +11,10 @@ #ifdef __KERNEL__ +#include <linux/string.h> #include <linux/sunrpc/msg_prot.h> #include <linux/sunrpc/cache.h> +#include <linux/string.h> struct svc_cred { uid_t cr_uid; @@ -111,7 +113,11 @@ extern struct auth_domain *auth_unix_lookup(struct in_addr addr); extern int auth_unix_forget_old(struct auth_domain *dom); extern void svcauth_unix_purge(void); -extern int name_hash(char *name, int size); +extern int hash_mem(char *buf, int len, int bits); +static inline int hash_str(char *name, int bits) +{ + return hash_mem(name, strlen(name), bits); +} extern struct cache_detail auth_domain_cache, ip_map_cache; |
