Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

dm-integrity: allocate the recalculate buffer with kmalloc

Allocate the recalculate buffer with kmalloc rather than vmalloc. This
will be needed later, for the simplification of the asynchronous hash
interface.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>

+4 -4
+4 -4
drivers/md/dm-integrity.c
··· 2998 2998 unsigned recalc_sectors = RECALC_SECTORS; 2999 2999 3000 3000 retry: 3001 - recalc_buffer = __vmalloc(recalc_sectors << SECTOR_SHIFT, GFP_NOIO); 3001 + recalc_buffer = kmalloc(recalc_sectors << SECTOR_SHIFT, GFP_NOIO | __GFP_NOWARN); 3002 3002 if (!recalc_buffer) { 3003 3003 oom: 3004 3004 recalc_sectors >>= 1; ··· 3012 3012 recalc_tags_size += ic->internal_hash_digestsize - ic->tag_size; 3013 3013 recalc_tags = kvmalloc(recalc_tags_size, GFP_NOIO); 3014 3014 if (!recalc_tags) { 3015 - vfree(recalc_buffer); 3015 + kfree(recalc_buffer); 3016 3016 recalc_buffer = NULL; 3017 3017 goto oom; 3018 3018 } ··· 3078 3078 goto err; 3079 3079 3080 3080 io_req.bi_opf = REQ_OP_READ; 3081 - io_req.mem.type = DM_IO_VMA; 3081 + io_req.mem.type = DM_IO_KMEM; 3082 3082 io_req.mem.ptr.addr = recalc_buffer; 3083 3083 io_req.notify.fn = NULL; 3084 3084 io_req.client = ic->io; ··· 3136 3136 recalc_write_super(ic); 3137 3137 3138 3138 free_ret: 3139 - vfree(recalc_buffer); 3139 + kfree(recalc_buffer); 3140 3140 kvfree(recalc_tags); 3141 3141 } 3142 3142