blk-map.c (93fbff1197474d7b65e598c6f48fa82a5c334539) | blk-map.c (f5d632d15e9e0a037339601680d82bb840f85d10) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Functions related to mapping data to requests 4 */ 5#include <linux/kernel.h> 6#include <linux/sched/task_stack.h> 7#include <linux/module.h> 8#include <linux/bio.h> --- 144 unchanged lines hidden (view full) --- 153 154 ret = -ENOMEM; 155 bio = bio_kmalloc(nr_pages, gfp_mask); 156 if (!bio) 157 goto out_bmd; 158 bio_init(bio, NULL, bio->bi_inline_vecs, nr_pages, req_op(rq)); 159 160 if (map_data) { | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Functions related to mapping data to requests 4 */ 5#include <linux/kernel.h> 6#include <linux/sched/task_stack.h> 7#include <linux/module.h> 8#include <linux/bio.h> --- 144 unchanged lines hidden (view full) --- 153 154 ret = -ENOMEM; 155 bio = bio_kmalloc(nr_pages, gfp_mask); 156 if (!bio) 157 goto out_bmd; 158 bio_init(bio, NULL, bio->bi_inline_vecs, nr_pages, req_op(rq)); 159 160 if (map_data) { |
161 nr_pages = 1 << map_data->page_order; | 161 nr_pages = 1U << map_data->page_order; |
162 i = map_data->offset / PAGE_SIZE; 163 } 164 while (len) { 165 unsigned int bytes = PAGE_SIZE; 166 167 bytes -= offset; 168 169 if (bytes > len) --- 498 unchanged lines hidden --- | 162 i = map_data->offset / PAGE_SIZE; 163 } 164 while (len) { 165 unsigned int bytes = PAGE_SIZE; 166 167 bytes -= offset; 168 169 if (bytes > len) --- 498 unchanged lines hidden --- |