loop: move updating lo_flags out of loop_set_status_from_info
authorChristoph Hellwig <hch@lst.de>
Fri, 10 Jan 2025 07:37:31 +0000 (08:37 +0100)
committerJens Axboe <axboe@kernel.dk>
Fri, 10 Jan 2025 14:31:50 +0000 (07:31 -0700)
commitae074d07a0e5c05769f1a9a2faa260c36d69465e
treea92f814fe59b99f29b8f36a028b3b6685dac097a
parentb03732a9c0db91522914185739505d92d3b0d816
loop: move updating lo_flags out of loop_set_status_from_info

While loop_configure simplify assigns the flags passed in by userspace,
loop_set_status only looks at the two changeable flags, and currently
has to do a complicate dance to implement that.

Move assign lo->lo_flags out of loop_set_status_from_info into the
callers and thus drastically simplify the lo_flags handling in
loop_set_status.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20250110073750.1582447-2-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/loop.c