]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ublk: avoid redundant io->cmd in ublk_queue_cmd_list()
authorCaleb Sander Mateos <csander@purestorage.com>
Fri, 28 Mar 2025 18:04:10 +0000 (12:04 -0600)
committerJens Axboe <axboe@kernel.dk>
Fri, 28 Mar 2025 22:15:43 +0000 (16:15 -0600)
commit108d8aecaeeb52f5fbe98ac94da534954db1da44
tree02dfdcb61f443348538d56bf9d148b198cf2b1f8
parent6a87fc437a034e4be2a63d8dfd4d2985c6c574bc
ublk: avoid redundant io->cmd in ublk_queue_cmd_list()

ublk_queue_cmd_list() loads io->cmd twice. The intervening stores
prevent the compiler from combining the loads. Since struct ublk_io *io
is only used to compute io->cmd, replace the variable with io->cmd.

Signed-off-by: Caleb Sander Mateos <csander@purestorage.com>
Link: https://lore.kernel.org/r/20250328180411.2696494-5-csander@purestorage.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/ublk_drv.c