OSDN Git Service

staging: lustre: remove unused OBD_SLAB_ALLOC* and OBD_SLAB_FREE* macros
authorMike Rapoport <mike.rapoport@gmail.com>
Tue, 20 Oct 2015 09:39:53 +0000 (12:39 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Oct 2015 01:46:17 +0000 (18:46 -0700)
The OBD_SLAB_ALLOC* and OBD_SLAB_FREE* macros are not used and can be
removed.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/include/obd_support.h

index bef80e2..7e06d22 100644 (file)
@@ -514,40 +514,6 @@ do {                                                                             \
        POISON_PTR(ptr);                                                      \
 } while (0)
 
-/* we memset() the slab object to 0 when allocation succeeds, so DO NOT
- * HAVE A CTOR THAT DOES ANYTHING.  its work will be cleared here.  we'd
- * love to assert on that, but slab.c keeps kmem_cache_s all to itself. */
-
-#define __OBD_SLAB_ALLOC_VERBOSE(ptr, slab, cptab, cpt, size, type)          \
-do {                                                                         \
-       LASSERT(ergo((type) != GFP_ATOMIC, !in_interrupt()));         \
-       (ptr) = (cptab) == NULL ?                                             \
-               kmem_cache_alloc(slab, type | __GFP_ZERO) :             \
-               kmem_cache_alloc_node(slab, type | __GFP_ZERO,          \
-                                     cfs_cpt_spread_node(cptab, cpt)); \
-} while (0)
-
-#define OBD_SLAB_ALLOC_GFP(ptr, slab, size, flags)                           \
-       __OBD_SLAB_ALLOC_VERBOSE(ptr, slab, NULL, 0, size, flags)
-
-#define OBD_SLAB_FREE(ptr, slab, size)                                 \
-do {                                                                     \
-       kmem_cache_free(slab, ptr);                                     \
-       POISON_PTR(ptr);                                                      \
-} while (0)
-
-#define OBD_SLAB_ALLOC(ptr, slab, size)                                              \
-       OBD_SLAB_ALLOC_GFP(ptr, slab, size, GFP_NOFS)
-
-#define OBD_SLAB_ALLOC_PTR(ptr, slab)                                        \
-       OBD_SLAB_ALLOC(ptr, slab, sizeof(*(ptr)))
-
-#define OBD_SLAB_ALLOC_PTR_GFP(ptr, slab, flags)                             \
-       OBD_SLAB_ALLOC_GFP(ptr, slab, sizeof(*(ptr)), flags)
-
-#define OBD_SLAB_FREE_PTR(ptr, slab)                                         \
-       OBD_SLAB_FREE((ptr), (slab), sizeof(*(ptr)))
-
 #define KEY_IS(str) \
        (keylen >= (sizeof(str)-1) && memcmp(key, str, (sizeof(str)-1)) == 0)