diff options
| author | Paul Mackerras <paulus@samba.org> | 2006-08-08 03:09:11 -0400 |
|---|---|---|
| committer | Paul Mackerras <paulus@samba.org> | 2006-08-08 03:09:11 -0400 |
| commit | 32bc6e095d75233e7c87cc6fa0e07942b124d194 (patch) | |
| tree | 8f83ef9a23d52d1305878b65dd98fc22b09b7f3e /net/sunrpc/cache.c | |
| parent | 5cf13911b1e72707b6f0eb39b2d819ec6e343d76 (diff) | |
| parent | 81b73dd92b97423b8f5324a59044da478c04f4c4 (diff) | |
Merge branch 'merge'
Diffstat (limited to 'net/sunrpc/cache.c')
| -rw-r--r-- | net/sunrpc/cache.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c index 7026b0866b7b..00cb388ece03 100644 --- a/net/sunrpc/cache.c +++ b/net/sunrpc/cache.c | |||
| @@ -71,7 +71,12 @@ struct cache_head *sunrpc_cache_lookup(struct cache_detail *detail, | |||
| 71 | new = detail->alloc(); | 71 | new = detail->alloc(); |
| 72 | if (!new) | 72 | if (!new) |
| 73 | return NULL; | 73 | return NULL; |
| 74 | /* must fully initialise 'new', else | ||
| 75 | * we might get lose if we need to | ||
| 76 | * cache_put it soon. | ||
| 77 | */ | ||
| 74 | cache_init(new); | 78 | cache_init(new); |
| 79 | detail->init(new, key); | ||
| 75 | 80 | ||
| 76 | write_lock(&detail->hash_lock); | 81 | write_lock(&detail->hash_lock); |
| 77 | 82 | ||
| @@ -85,7 +90,6 @@ struct cache_head *sunrpc_cache_lookup(struct cache_detail *detail, | |||
| 85 | return tmp; | 90 | return tmp; |
| 86 | } | 91 | } |
| 87 | } | 92 | } |
| 88 | detail->init(new, key); | ||
| 89 | new->next = *head; | 93 | new->next = *head; |
| 90 | *head = new; | 94 | *head = new; |
| 91 | detail->entries++; | 95 | detail->entries++; |
