summaryrefslogtreecommitdiffstats
path: root/drivers/md/raid6main.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2006-02-03 12:03:41 +0100
committerLinus Torvalds <torvalds@g5.osdl.org>2006-02-03 17:32:00 +0100
commit29fc7e3e70a05e9eea28afb6707a39c1a53e2f66 (patch)
tree4e8bc28c717116ade3cd723a921f3260656327aa /drivers/md/raid6main.c
parent[PATCH] md: Handle overflow of mdu_array_info_t->size better (diff)
downloadlinux-29fc7e3e70a05e9eea28afb6707a39c1a53e2f66.tar.xz
linux-29fc7e3e70a05e9eea28afb6707a39c1a53e2f66.zip
[PATCH] md: Assorted little md fixes
- version-1 superblock + The default_bitmap_offset is in sectors, not bytes. + the 'size' field in the superblock is in sectors, not KB - raid0_run should return a negative number on error, not '1' - raid10_read_balance should not return a valid 'disk' number if ->rdev turned out to be NULL - kmem_cache_destroy doesn't like being passed a NULL. Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/md/raid6main.c')
-rw-r--r--drivers/md/raid6main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/md/raid6main.c b/drivers/md/raid6main.c
index ed2abb2e2e2d..cd477ebf2ee4 100644
--- a/drivers/md/raid6main.c
+++ b/drivers/md/raid6main.c
@@ -366,7 +366,8 @@ static void shrink_stripes(raid6_conf_t *conf)
while (drop_one_stripe(conf))
;
- kmem_cache_destroy(conf->slab_cache);
+ if (conf->slab_cache)
+ kmem_cache_destroy(conf->slab_cache);
conf->slab_cache = NULL;
}