diff options
| author | Neil Brown <neilb@cse.unsw.edu.au> | 2004-08-22 23:00:47 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-08-22 23:00:47 -0700 |
| commit | 0be5edbc2e0626ec327a29ee9555fd93f6332dc4 (patch) | |
| tree | 3f7c9daee7e7a3078ec8b233880aeaec429f3a0f /include/linux | |
| parent | 4feb71cc86bfabfd357787191bc3f77ab33dd088 (diff) | |
[PATCH] nfsd: make cache_init initialize reference count to 1
Presumably anyone creating a new cache entry is going to want a reference on
that cache; and indeed every caller of cache_init increments the reference
count immediately afterwards. So may as well make cache_init set an initial
reference count of 1.
Also, note that cache_init initializes the flags; callers don't need to.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/sunrpc/cache.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/include/linux/sunrpc/cache.h b/include/linux/sunrpc/cache.h index 6c5f0060a317..a98b1981fc0a 100644 --- a/include/linux/sunrpc/cache.h +++ b/include/linux/sunrpc/cache.h @@ -233,7 +233,6 @@ RTN *FNAME ARGS \ new = kmalloc(sizeof(*new), GFP_KERNEL); \ if (new) { \ cache_init(&new->MEMBER); \ - cache_get(&new->MEMBER); \ goto retry; \ } \ return NULL; \ |
