Loading include/linux/sunrpc/cache.h +3 −0 Original line number Diff line number Diff line Loading @@ -255,10 +255,13 @@ static inline time_t get_expiry(char **bpp) return rv - boot.tv_sec; } #ifdef CONFIG_NFSD_DEPRECATED static inline void sunrpc_invalidate(struct cache_head *h, struct cache_detail *detail) { h->expiry_time = seconds_since_boot() - 1; detail->nextcheck = seconds_since_boot(); } #endif /* CONFIG_NFSD_DEPRECATED */ #endif /* _LINUX_SUNRPC_CACHE_H_ */ net/sunrpc/svcauth_unix.c +12 −0 Original line number Diff line number Diff line Loading @@ -30,7 +30,9 @@ struct unix_domain { struct auth_domain h; #ifdef CONFIG_NFSD_DEPRECATED int addr_changes; #endif /* CONFIG_NFSD_DEPRECATED */ /* other stuff later */ }; Loading Loading @@ -64,7 +66,9 @@ struct auth_domain *unix_domain_find(char *name) return NULL; } new->h.flavour = &svcauth_unix; #ifdef CONFIG_NFSD_DEPRECATED new->addr_changes = 0; #endif /* CONFIG_NFSD_DEPRECATED */ rv = auth_domain_lookup(name, &new->h); } } Loading @@ -91,7 +95,9 @@ struct ip_map { char m_class[8]; /* e.g. "nfsd" */ struct in6_addr m_addr; struct unix_domain *m_client; #ifdef CONFIG_NFSD_DEPRECATED int m_add_change; #endif /* CONFIG_NFSD_DEPRECATED */ }; static void ip_map_put(struct kref *kref) Loading Loading @@ -145,7 +151,9 @@ static void update(struct cache_head *cnew, struct cache_head *citem) kref_get(&item->m_client->h.ref); new->m_client = item->m_client; #ifdef CONFIG_NFSD_DEPRECATED new->m_add_change = item->m_add_change; #endif /* CONFIG_NFSD_DEPRECATED */ } static struct cache_head *ip_map_alloc(void) { Loading Loading @@ -330,6 +338,7 @@ static int __ip_map_update(struct cache_detail *cd, struct ip_map *ipm, ip.h.flags = 0; if (!udom) set_bit(CACHE_NEGATIVE, &ip.h.flags); #ifdef CONFIG_NFSD_DEPRECATED else { ip.m_add_change = udom->addr_changes; /* if this is from the legacy set_client system call, Loading @@ -338,6 +347,7 @@ static int __ip_map_update(struct cache_detail *cd, struct ip_map *ipm, if (expiry == NEVER) ip.m_add_change++; } #endif /* CONFIG_NFSD_DEPRECATED */ ip.h.expiry_time = expiry; ch = sunrpc_cache_update(cd, &ip.h, &ipm->h, hash_str(ipm->m_class, IP_HASHBITS) ^ Loading @@ -357,6 +367,7 @@ static inline int ip_map_update(struct net *net, struct ip_map *ipm, return __ip_map_update(sn->ip_map_cache, ipm, udom, expiry); } #ifdef CONFIG_NFSD_DEPRECATED int auth_unix_add_addr(struct net *net, struct in6_addr *addr, struct auth_domain *dom) { struct unix_domain *udom; Loading Loading @@ -411,6 +422,7 @@ struct auth_domain *auth_unix_lookup(struct net *net, struct in6_addr *addr) return rv; } EXPORT_SYMBOL_GPL(auth_unix_lookup); #endif /* CONFIG_NFSD_DEPRECATED */ void svcauth_unix_purge(void) { Loading Loading
include/linux/sunrpc/cache.h +3 −0 Original line number Diff line number Diff line Loading @@ -255,10 +255,13 @@ static inline time_t get_expiry(char **bpp) return rv - boot.tv_sec; } #ifdef CONFIG_NFSD_DEPRECATED static inline void sunrpc_invalidate(struct cache_head *h, struct cache_detail *detail) { h->expiry_time = seconds_since_boot() - 1; detail->nextcheck = seconds_since_boot(); } #endif /* CONFIG_NFSD_DEPRECATED */ #endif /* _LINUX_SUNRPC_CACHE_H_ */
net/sunrpc/svcauth_unix.c +12 −0 Original line number Diff line number Diff line Loading @@ -30,7 +30,9 @@ struct unix_domain { struct auth_domain h; #ifdef CONFIG_NFSD_DEPRECATED int addr_changes; #endif /* CONFIG_NFSD_DEPRECATED */ /* other stuff later */ }; Loading Loading @@ -64,7 +66,9 @@ struct auth_domain *unix_domain_find(char *name) return NULL; } new->h.flavour = &svcauth_unix; #ifdef CONFIG_NFSD_DEPRECATED new->addr_changes = 0; #endif /* CONFIG_NFSD_DEPRECATED */ rv = auth_domain_lookup(name, &new->h); } } Loading @@ -91,7 +95,9 @@ struct ip_map { char m_class[8]; /* e.g. "nfsd" */ struct in6_addr m_addr; struct unix_domain *m_client; #ifdef CONFIG_NFSD_DEPRECATED int m_add_change; #endif /* CONFIG_NFSD_DEPRECATED */ }; static void ip_map_put(struct kref *kref) Loading Loading @@ -145,7 +151,9 @@ static void update(struct cache_head *cnew, struct cache_head *citem) kref_get(&item->m_client->h.ref); new->m_client = item->m_client; #ifdef CONFIG_NFSD_DEPRECATED new->m_add_change = item->m_add_change; #endif /* CONFIG_NFSD_DEPRECATED */ } static struct cache_head *ip_map_alloc(void) { Loading Loading @@ -330,6 +338,7 @@ static int __ip_map_update(struct cache_detail *cd, struct ip_map *ipm, ip.h.flags = 0; if (!udom) set_bit(CACHE_NEGATIVE, &ip.h.flags); #ifdef CONFIG_NFSD_DEPRECATED else { ip.m_add_change = udom->addr_changes; /* if this is from the legacy set_client system call, Loading @@ -338,6 +347,7 @@ static int __ip_map_update(struct cache_detail *cd, struct ip_map *ipm, if (expiry == NEVER) ip.m_add_change++; } #endif /* CONFIG_NFSD_DEPRECATED */ ip.h.expiry_time = expiry; ch = sunrpc_cache_update(cd, &ip.h, &ipm->h, hash_str(ipm->m_class, IP_HASHBITS) ^ Loading @@ -357,6 +367,7 @@ static inline int ip_map_update(struct net *net, struct ip_map *ipm, return __ip_map_update(sn->ip_map_cache, ipm, udom, expiry); } #ifdef CONFIG_NFSD_DEPRECATED int auth_unix_add_addr(struct net *net, struct in6_addr *addr, struct auth_domain *dom) { struct unix_domain *udom; Loading Loading @@ -411,6 +422,7 @@ struct auth_domain *auth_unix_lookup(struct net *net, struct in6_addr *addr) return rv; } EXPORT_SYMBOL_GPL(auth_unix_lookup); #endif /* CONFIG_NFSD_DEPRECATED */ void svcauth_unix_purge(void) { Loading