Removed the my_zero_fill_bio fuction definition and used the kernel library function zero_fill_bio instead.
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)
{
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)