]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Change atomic_inc to cache_get twice.
authorNeil Brown <neilb@cse.unsw.edu.au>
Tue, 5 Aug 2003 06:20:16 +0000 (23:20 -0700)
committerLinus Torvalds <torvalds@home.osdl.org>
Tue, 5 Aug 2003 06:20:16 +0000 (23:20 -0700)
include/linux/sunrpc/cache.h

index 9d4c3eff43b96a3d06ea67c568a698725a5786fa..a9575c349cfe7f6de022f3e6998f3126d904625f 100644 (file)
@@ -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;                                                             \