diff options
author | Goldwyn Rodrigues <rgoldwyn@suse.com> | 2015-07-22 13:09:16 -0400 |
---|---|---|
committer | NeilBrown <neilb@suse.com> | 2015-07-23 23:37:48 -0400 |
commit | f7357273198adc86fe11c2a7be8a0816f44103bb (patch) | |
tree | 639ac99fb76688765b4eb5e8003b688525ac3e20 /drivers/md/bitmap.c | |
parent | 34cab6f42003cb06f48f86a86652984dec338ae9 (diff) |
md: Skip cluster setup in case of error while reading bitmap
If the bitmap read fails, the error code set is -EINVAL. However,
we don't check for errors and go ahead with cluster_setup.
Skip the cluster setup in case of error.
Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
Signed-off-by: NeilBrown <neilb@suse.com>
Diffstat (limited to 'drivers/md/bitmap.c')
-rw-r--r-- | drivers/md/bitmap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c index c90118e90708..a4ab51350f40 100644 --- a/drivers/md/bitmap.c +++ b/drivers/md/bitmap.c | |||
@@ -680,7 +680,7 @@ out: | |||
680 | kunmap_atomic(sb); | 680 | kunmap_atomic(sb); |
681 | /* Assiging chunksize is required for "re_read" */ | 681 | /* Assiging chunksize is required for "re_read" */ |
682 | bitmap->mddev->bitmap_info.chunksize = chunksize; | 682 | bitmap->mddev->bitmap_info.chunksize = chunksize; |
683 | if (nodes && (bitmap->cluster_slot < 0)) { | 683 | if (err == 0 && nodes && (bitmap->cluster_slot < 0)) { |
684 | err = md_setup_cluster(bitmap->mddev, nodes); | 684 | err = md_setup_cluster(bitmap->mddev, nodes); |
685 | if (err) { | 685 | if (err) { |
686 | pr_err("%s: Could not setup cluster service (%d)\n", | 686 | pr_err("%s: Could not setup cluster service (%d)\n", |