Skip to content

Commit cc8f7fe

Browse files
Haimin Zhangaxboe
authored andcommitted
block-map: add __GFP_ZERO flag for alloc_page in function bio_copy_kern
Add __GFP_ZERO flag for alloc_page in function bio_copy_kern to initialize the buffer of a bio. Signed-off-by: Haimin Zhang <[email protected]> Reviewed-by: Chaitanya Kulkarni <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent 06582bc commit cc8f7fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

block/blk-map.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ static struct bio *bio_copy_kern(struct request_queue *q, void *data,
446446
if (bytes > len)
447447
bytes = len;
448448

449-
page = alloc_page(GFP_NOIO | gfp_mask);
449+
page = alloc_page(GFP_NOIO | __GFP_ZERO | gfp_mask);
450450
if (!page)
451451
goto cleanup;
452452

0 commit comments

Comments
 (0)