md: remove unnecessary check on mddev
authorMing Lei <tom.leiming@gmail.com>
Tue, 14 Feb 2017 15:29:02 +0000 (23:29 +0800)
committerShaohua Li <shli@fb.com>
Wed, 15 Feb 2017 19:24:13 +0000 (11:24 -0800)
mddev is never NULL and neither is ->bio_set, so
remove the check.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Shaohua Li <shli@fb.com>
drivers/md/md.c

index 137a1fe124e8c09b2a8d5382840120c541d8d8f4..0e408bc6790439720c6c2f1f03152139e85eb635 100644 (file)
@@ -193,9 +193,6 @@ EXPORT_SYMBOL_GPL(bio_alloc_mddev);
 struct bio *bio_clone_mddev(struct bio *bio, gfp_t gfp_mask,
                            struct mddev *mddev)
 {
-       if (!mddev || !mddev->bio_set)
-               return bio_clone(bio, gfp_mask);
-
        return bio_clone_bioset(bio, gfp_mask, mddev->bio_set);
 }
 EXPORT_SYMBOL_GPL(bio_clone_mddev);