diff options
author | Rabin Vincent <rabin@rab.in> | 2008-07-03 15:10:32 -0400 |
---|---|---|
committer | Pekka Enberg <penberg@cs.helsinki.fi> | 2008-07-15 13:36:02 -0400 |
commit | e79aec291da55aa322ddb5d8f3bb04cdf69470d5 (patch) | |
tree | aa49571cf5cb7a085dd8bdb9c88ad13e5a1250f7 | |
parent | 88e4ccf294ca62c2da998012a83533ce150c8dce (diff) |
slab: rename slab_destroy_objs
With the removal of destructors, slab_destroy_objs no longer actually
destroys any objects, making the kernel doc incorrect and the function
name misleading.
In keeping with the other debug functions, rename it to
slab_destroy_debugcheck and drop the kernel doc.
Signed-off-by: Rabin Vincent <rabin@rab.in>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
-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 | ||