Commit 37b22c28 authored by Chengguang Xu's avatar Chengguang Xu Committed by Shaohua Li

md: remvoe redundant condition check

mempool_destroy() can handle NULL pointer correctly,
so there is no need to check NULL pointer before calling
mempool_destroy().
Signed-off-by: default avatarChengguang Xu <cgxu519@gmx.com>
Signed-off-by: default avatarShaohua Li <shli@fb.com>
parent be85f93a
......@@ -5692,14 +5692,10 @@ int md_run(struct mddev *mddev)
return 0;
abort:
if (mddev->flush_bio_pool) {
mempool_destroy(mddev->flush_bio_pool);
mddev->flush_bio_pool = NULL;
}
if (mddev->flush_pool){
mempool_destroy(mddev->flush_pool);
mddev->flush_pool = NULL;
}
mempool_destroy(mddev->flush_bio_pool);
mddev->flush_bio_pool = NULL;
mempool_destroy(mddev->flush_pool);
mddev->flush_pool = NULL;
return err;
}
......
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