summaryrefslogtreecommitdiffstats
path: root/block/blk-map.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2022-08-06 00:39:04 +0200
committerJens Axboe <axboe@kernel.dk>2022-08-22 18:07:56 +0200
commitf5d632d15e9e0a037339601680d82bb840f85d10 (patch)
tree9b13ba0fcdf8da7c7fdd6a93e072517cd79d5b6e /block/blk-map.c
parentblock, bfq: remove useless parameter for bfq_add/del_bfqq_busy() (diff)
downloadlinux-f5d632d15e9e0a037339601680d82bb840f85d10.tar.xz
linux-f5d632d15e9e0a037339601680d82bb840f85d10.zip
block: shrink rq_map_data a bit
We don't need full ints for several of these members. Change the page_order and nr_entries to unsigned shorts, and the true/false from_user and null_mapped to booleans. This shrinks the struct from 32 to 24 bytes on 64-bit archs. Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-map.c')
-rw-r--r--block/blk-map.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/blk-map.c b/block/blk-map.c
index 7196a6b64c80..379c52d2f2d1 100644
--- a/block/blk-map.c
+++ b/block/blk-map.c
@@ -158,7 +158,7 @@ static int bio_copy_user_iov(struct request *rq, struct rq_map_data *map_data,
bio_init(bio, NULL, bio->bi_inline_vecs, nr_pages, req_op(rq));
if (map_data) {
- nr_pages = 1 << map_data->page_order;
+ nr_pages = 1U << map_data->page_order;
i = map_data->offset / PAGE_SIZE;
}
while (len) {