From: Heinz Mauelshagen <heinzm@xxxxxxxxxx> Signed-off-by: heinzm <heinzm@xxxxxxxxxx> --- drivers/md/md-bitmap.c | 3 +-- drivers/md/md-cluster.c | 3 +-- drivers/md/raid5.c | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/md/md-bitmap.c b/drivers/md/md-bitmap.c index 9f1e25927d13..65e77a7e3656 100644 --- a/drivers/md/md-bitmap.c +++ b/drivers/md/md-bitmap.c @@ -2173,9 +2173,8 @@ int md_bitmap_resize(struct bitmap *bitmap, sector_t blocks, unsigned long k; /* deallocate the page memory */ - for (k = 0; k < page; k++) { + for (k = 0; k < page; k++) kfree(new_bp[k].map); - } kfree(new_bp); /* restore some fields from old_counts */ diff --git a/drivers/md/md-cluster.c b/drivers/md/md-cluster.c index 7ad5e1a97638..762160e81ce8 100644 --- a/drivers/md/md-cluster.c +++ b/drivers/md/md-cluster.c @@ -1531,9 +1531,8 @@ static void unlock_all_bitmaps(struct mddev *mddev) /* release other node's bitmap lock if they are existed */ if (cinfo->other_bitmap_lockres) { for (i = 0; i < mddev->bitmap_info.nodes - 1; i++) { - if (cinfo->other_bitmap_lockres[i]) { + if (cinfo->other_bitmap_lockres[i]) lockres_free(cinfo->other_bitmap_lockres[i]); - } } kfree(cinfo->other_bitmap_lockres); cinfo->other_bitmap_lockres = NULL; diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 08a0ee77cacb..f834c497b8fe 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c @@ -4109,9 +4109,8 @@ static void handle_stripe_clean_event(struct r5conf *conf, pr_debug("Return write for disc %d\n", i); if (test_and_clear_bit(R5_Discard, &dev->flags)) clear_bit(R5_UPTODATE, &dev->flags); - if (test_and_clear_bit(R5_SkipCopy, &dev->flags)) { + if (test_and_clear_bit(R5_SkipCopy, &dev->flags)) WARN_ON(test_bit(R5_UPTODATE, &dev->flags)); - } do_endio = true; returnbi: -- 2.39.2