diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/slab.c | 14 |
1 files changed, 3 insertions, 11 deletions
@@ -1901,15 +1901,7 @@ static void check_poison_obj(struct kmem_cache *cachep, void *objp) | |||
1901 | #endif | 1901 | #endif |
1902 | 1902 | ||
1903 | #if DEBUG | 1903 | #if DEBUG |
1904 | /** | 1904 | static void slab_destroy_debugcheck(struct kmem_cache *cachep, struct slab *slabp) |
1905 | * slab_destroy_objs - destroy a slab and its objects | ||
1906 | * @cachep: cache pointer being destroyed | ||
1907 | * @slabp: slab pointer being destroyed | ||
1908 | * | ||
1909 | * Call the registered destructor for each object in a slab that is being | ||
1910 | * destroyed. | ||
1911 | */ | ||
1912 | static void slab_destroy_objs(struct kmem_cache *cachep, struct slab *slabp) | ||
1913 | { | 1905 | { |
1914 | int i; | 1906 | int i; |
1915 | for (i = 0; i < cachep->num; i++) { | 1907 | for (i = 0; i < cachep->num; i++) { |
@@ -1938,7 +1930,7 @@ static void slab_destroy_objs(struct kmem_cache *cachep, struct slab *slabp) | |||
1938 | } | 1930 | } |
1939 | } | 1931 | } |
1940 | #else | 1932 | #else |
1941 | static void slab_destroy_objs(struct kmem_cache *cachep, struct slab *slabp) | 1933 | static void slab_destroy_debugcheck(struct kmem_cache *cachep, struct slab *slabp) |
1942 | { | 1934 | { |
1943 | } | 1935 | } |
1944 | #endif | 1936 | #endif |
@@ -1956,7 +1948,7 @@ static void slab_destroy(struct kmem_cache *cachep, struct slab *slabp) | |||
1956 | { | 1948 | { |
1957 | void *addr = slabp->s_mem - slabp->colouroff; | 1949 | void *addr = slabp->s_mem - slabp->colouroff; |
1958 | 1950 | ||
1959 | slab_destroy_objs(cachep, slabp); | 1951 | slab_destroy_debugcheck(cachep, slabp); |
1960 | if (unlikely(cachep->flags & SLAB_DESTROY_BY_RCU)) { | 1952 | if (unlikely(cachep->flags & SLAB_DESTROY_BY_RCU)) { |
1961 | struct slab_rcu *slab_rcu; | 1953 | struct slab_rcu *slab_rcu; |
1962 | 1954 | ||