diff options
author | J. Bruce Fields <bfields@fieldses.org> | 2011-01-04 13:31:45 -0500 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2011-01-04 16:48:02 -0500 |
commit | bdd5f05d91e8ae68075b812ce244c918d3d752cd (patch) | |
tree | 45e5e9d403ee26a666cd9fbcfee5e26ea6511d50 /net/sunrpc/svcauth_unix.c | |
parent | 31f7aa65f536995c6d933c57230919ae408952a5 (diff) |
SUNRPC: Remove more code when NFSD_DEPRECATED is not configured
Signed-off-by: NeilBrown <neilb@suse.de>
[bfields@redhat.com: moved svcauth_unix_purge outside ifdef's.]
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'net/sunrpc/svcauth_unix.c')
-rw-r--r-- | net/sunrpc/svcauth_unix.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/net/sunrpc/svcauth_unix.c b/net/sunrpc/svcauth_unix.c index 59a7c524a8b1..30916b06c12b 100644 --- a/net/sunrpc/svcauth_unix.c +++ b/net/sunrpc/svcauth_unix.c | |||
@@ -30,7 +30,9 @@ | |||
30 | 30 | ||
31 | struct unix_domain { | 31 | struct unix_domain { |
32 | struct auth_domain h; | 32 | struct auth_domain h; |
33 | #ifdef CONFIG_NFSD_DEPRECATED | ||
33 | int addr_changes; | 34 | int addr_changes; |
35 | #endif /* CONFIG_NFSD_DEPRECATED */ | ||
34 | /* other stuff later */ | 36 | /* other stuff later */ |
35 | }; | 37 | }; |
36 | 38 | ||
@@ -64,7 +66,9 @@ struct auth_domain *unix_domain_find(char *name) | |||
64 | return NULL; | 66 | return NULL; |
65 | } | 67 | } |
66 | new->h.flavour = &svcauth_unix; | 68 | new->h.flavour = &svcauth_unix; |
69 | #ifdef CONFIG_NFSD_DEPRECATED | ||
67 | new->addr_changes = 0; | 70 | new->addr_changes = 0; |
71 | #endif /* CONFIG_NFSD_DEPRECATED */ | ||
68 | rv = auth_domain_lookup(name, &new->h); | 72 | rv = auth_domain_lookup(name, &new->h); |
69 | } | 73 | } |
70 | } | 74 | } |
@@ -91,7 +95,9 @@ struct ip_map { | |||
91 | char m_class[8]; /* e.g. "nfsd" */ | 95 | char m_class[8]; /* e.g. "nfsd" */ |
92 | struct in6_addr m_addr; | 96 | struct in6_addr m_addr; |
93 | struct unix_domain *m_client; | 97 | struct unix_domain *m_client; |
98 | #ifdef CONFIG_NFSD_DEPRECATED | ||
94 | int m_add_change; | 99 | int m_add_change; |
100 | #endif /* CONFIG_NFSD_DEPRECATED */ | ||
95 | }; | 101 | }; |
96 | 102 | ||
97 | static void ip_map_put(struct kref *kref) | 103 | static void ip_map_put(struct kref *kref) |
@@ -145,7 +151,9 @@ static void update(struct cache_head *cnew, struct cache_head *citem) | |||
145 | 151 | ||
146 | kref_get(&item->m_client->h.ref); | 152 | kref_get(&item->m_client->h.ref); |
147 | new->m_client = item->m_client; | 153 | new->m_client = item->m_client; |
154 | #ifdef CONFIG_NFSD_DEPRECATED | ||
148 | new->m_add_change = item->m_add_change; | 155 | new->m_add_change = item->m_add_change; |
156 | #endif /* CONFIG_NFSD_DEPRECATED */ | ||
149 | } | 157 | } |
150 | static struct cache_head *ip_map_alloc(void) | 158 | static struct cache_head *ip_map_alloc(void) |
151 | { | 159 | { |
@@ -330,6 +338,7 @@ static int __ip_map_update(struct cache_detail *cd, struct ip_map *ipm, | |||
330 | ip.h.flags = 0; | 338 | ip.h.flags = 0; |
331 | if (!udom) | 339 | if (!udom) |
332 | set_bit(CACHE_NEGATIVE, &ip.h.flags); | 340 | set_bit(CACHE_NEGATIVE, &ip.h.flags); |
341 | #ifdef CONFIG_NFSD_DEPRECATED | ||
333 | else { | 342 | else { |
334 | ip.m_add_change = udom->addr_changes; | 343 | ip.m_add_change = udom->addr_changes; |
335 | /* if this is from the legacy set_client system call, | 344 | /* if this is from the legacy set_client system call, |
@@ -338,6 +347,7 @@ static int __ip_map_update(struct cache_detail *cd, struct ip_map *ipm, | |||
338 | if (expiry == NEVER) | 347 | if (expiry == NEVER) |
339 | ip.m_add_change++; | 348 | ip.m_add_change++; |
340 | } | 349 | } |
350 | #endif /* CONFIG_NFSD_DEPRECATED */ | ||
341 | ip.h.expiry_time = expiry; | 351 | ip.h.expiry_time = expiry; |
342 | ch = sunrpc_cache_update(cd, &ip.h, &ipm->h, | 352 | ch = sunrpc_cache_update(cd, &ip.h, &ipm->h, |
343 | hash_str(ipm->m_class, IP_HASHBITS) ^ | 353 | hash_str(ipm->m_class, IP_HASHBITS) ^ |
@@ -357,6 +367,7 @@ static inline int ip_map_update(struct net *net, struct ip_map *ipm, | |||
357 | return __ip_map_update(sn->ip_map_cache, ipm, udom, expiry); | 367 | return __ip_map_update(sn->ip_map_cache, ipm, udom, expiry); |
358 | } | 368 | } |
359 | 369 | ||
370 | #ifdef CONFIG_NFSD_DEPRECATED | ||
360 | int auth_unix_add_addr(struct net *net, struct in6_addr *addr, struct auth_domain *dom) | 371 | int auth_unix_add_addr(struct net *net, struct in6_addr *addr, struct auth_domain *dom) |
361 | { | 372 | { |
362 | struct unix_domain *udom; | 373 | struct unix_domain *udom; |
@@ -411,6 +422,7 @@ struct auth_domain *auth_unix_lookup(struct net *net, struct in6_addr *addr) | |||
411 | return rv; | 422 | return rv; |
412 | } | 423 | } |
413 | EXPORT_SYMBOL_GPL(auth_unix_lookup); | 424 | EXPORT_SYMBOL_GPL(auth_unix_lookup); |
425 | #endif /* CONFIG_NFSD_DEPRECATED */ | ||
414 | 426 | ||
415 | void svcauth_unix_purge(void) | 427 | void svcauth_unix_purge(void) |
416 | { | 428 | { |