Commit 2a7ae342 authored by Neil Brown's avatar Neil Brown Committed by Linus Torvalds

[PATCH] Change atomic_inc to cache_get twice.

parent 67dec770
......@@ -173,7 +173,7 @@ RTN *FNAME ARGS \
if (set && !INPLACE && test_bit(CACHE_VALID, &tmp->MEMBER.flags) && !new) \
break; \
\
atomic_inc(&tmp->MEMBER.refcnt); \
cache_get(&tmp->MEMBER); \
if (set) { \
if (!INPLACE && test_bit(CACHE_VALID, &tmp->MEMBER.flags))\
{ /* need to swap in new */ \
......@@ -221,7 +221,7 @@ RTN *FNAME ARGS \
new = kmalloc(sizeof(*new), GFP_KERNEL); \
if (new) { \
cache_init(&new->MEMBER); \
atomic_inc(&new->MEMBER.refcnt); \
cache_get(&new->MEMBER); \
INIT; \
tmp = new; \
goto retry; \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment