From 29fc7e3e70a05e9eea28afb6707a39c1a53e2f66 Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Fri, 3 Feb 2006 03:03:41 -0800 Subject: [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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/md/raid10.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/md/raid10.c') diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c index 9130d051b47..ab90a6d1202 100644 --- a/drivers/md/raid10.c +++ b/drivers/md/raid10.c @@ -565,6 +565,8 @@ rb_out: if (disk >= 0 && (rdev=rcu_dereference(conf->mirrors[disk].rdev))!= NULL) atomic_inc(&conf->mirrors[disk].rdev->nr_pending); + else + disk = -1; rcu_read_unlock(); return disk; -- cgit v1.2.3