Commit e337aead authored by NeilBrown's avatar NeilBrown

md/raid10: avoid memory leak on error path during reshape.

If raid10 reshape fails to find somewhere to read a block
from, it returns without freeing memory...
Signed-off-by: default avatarNeilBrown <neilb@suse.de>
parent b3968552
...@@ -4399,6 +4399,7 @@ static sector_t reshape_request(struct mddev *mddev, sector_t sector_nr, ...@@ -4399,6 +4399,7 @@ static sector_t reshape_request(struct mddev *mddev, sector_t sector_nr,
* on all the target devices. * on all the target devices.
*/ */
// FIXME // FIXME
mempool_free(r10_bio, conf->r10buf_pool);
set_bit(MD_RECOVERY_INTR, &mddev->recovery); set_bit(MD_RECOVERY_INTR, &mddev->recovery);
return sectors_done; return sectors_done;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment