diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/sunrpc/cache.h | 11 | ||||
-rw-r--r-- | include/linux/sunrpc/svcauth.h | 1 | ||||
-rw-r--r-- | include/linux/sunrpc/svcsock.h | 3 |
3 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/sunrpc/cache.h b/include/linux/sunrpc/cache.h index b5612c958cce..3699dff7db8f 100644 --- a/include/linux/sunrpc/cache.h +++ b/include/linux/sunrpc/cache.h | |||
@@ -163,6 +163,17 @@ static inline void cache_put(struct cache_head *h, struct cache_detail *cd) | |||
163 | kref_put(&h->ref, cd->cache_put); | 163 | kref_put(&h->ref, cd->cache_put); |
164 | } | 164 | } |
165 | 165 | ||
166 | static inline int cache_valid(struct cache_head *h) | ||
167 | { | ||
168 | /* If an item has been unhashed pending removal when | ||
169 | * the refcount drops to 0, the expiry_time will be | ||
170 | * set to 0. We don't want to consider such items | ||
171 | * valid in this context even though CACHE_VALID is | ||
172 | * set. | ||
173 | */ | ||
174 | return (h->expiry_time != 0 && test_bit(CACHE_VALID, &h->flags)); | ||
175 | } | ||
176 | |||
166 | extern int cache_check(struct cache_detail *detail, | 177 | extern int cache_check(struct cache_detail *detail, |
167 | struct cache_head *h, struct cache_req *rqstp); | 178 | struct cache_head *h, struct cache_req *rqstp); |
168 | extern void cache_flush(void); | 179 | extern void cache_flush(void); |
diff --git a/include/linux/sunrpc/svcauth.h b/include/linux/sunrpc/svcauth.h index a6601650deeb..de92619b0826 100644 --- a/include/linux/sunrpc/svcauth.h +++ b/include/linux/sunrpc/svcauth.h | |||
@@ -126,6 +126,7 @@ extern struct auth_domain *auth_domain_find(char *name); | |||
126 | extern struct auth_domain *auth_unix_lookup(struct in_addr addr); | 126 | extern struct auth_domain *auth_unix_lookup(struct in_addr addr); |
127 | extern int auth_unix_forget_old(struct auth_domain *dom); | 127 | extern int auth_unix_forget_old(struct auth_domain *dom); |
128 | extern void svcauth_unix_purge(void); | 128 | extern void svcauth_unix_purge(void); |
129 | extern void svcauth_unix_info_release(void *); | ||
129 | 130 | ||
130 | static inline unsigned long hash_str(char *name, int bits) | 131 | static inline unsigned long hash_str(char *name, int bits) |
131 | { | 132 | { |
diff --git a/include/linux/sunrpc/svcsock.h b/include/linux/sunrpc/svcsock.h index 4c296152cbfa..98b21ad370fd 100644 --- a/include/linux/sunrpc/svcsock.h +++ b/include/linux/sunrpc/svcsock.h | |||
@@ -54,6 +54,9 @@ struct svc_sock { | |||
54 | int sk_reclen; /* length of record */ | 54 | int sk_reclen; /* length of record */ |
55 | int sk_tcplen; /* current read length */ | 55 | int sk_tcplen; /* current read length */ |
56 | time_t sk_lastrecv; /* time of last received request */ | 56 | time_t sk_lastrecv; /* time of last received request */ |
57 | |||
58 | /* cache of various info for TCP sockets */ | ||
59 | void *sk_info_authunix; | ||
57 | }; | 60 | }; |
58 | 61 | ||
59 | /* | 62 | /* |