From: venkat Date: Wed, 21 Dec 2016 22:53:28 +0000 (-0500) Subject: Replacing my_zero_fill_bio with zero_fill_bio X-Git-Url: https://git.fsl.cs.sunysb.edu/?a=commitdiff_plain;h=27dfcfc457f0ba3bcc0c990748201868587f91ac;p=linux-dmdedup.git Replacing my_zero_fill_bio with zero_fill_bio Removed the my_zero_fill_bio fuction definition and used the kernel library function zero_fill_bio instead. --- diff --git a/drivers/md/dm-dedup-rw.c b/drivers/md/dm-dedup-rw.c index 7947f798984..5981ff20b43 100644 --- a/drivers/md/dm-dedup-rw.c +++ b/drivers/md/dm-dedup-rw.c @@ -111,20 +111,6 @@ static void my_endio(struct bio *clone, int error) bio_put(clone); } -/* - * XXX: there is existing zero_fill_bio() in the kernel, - * should we use it? - */ -static void my_zero_fill_bio(struct bio *bio) -{ - void *data; - unsigned int length; - - data = bio_data(bio); - length = bio_cur_bytes(bio); - memset(data, 0, length); -} - static struct bio *create_bio(struct dedup_config *dc, struct bio *bio) { @@ -216,7 +202,7 @@ static struct bio *prepare_bio_without_pbn(struct dedup_config *dc, if (!clone) goto out; - my_zero_fill_bio(clone); + zero_fill_bio(clone); r = merge_data(dc, clone->bi_io_vec->bv_page, bio); if (r < 0)