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.

loop: don't clear LO_FLAGS_PARTSCAN on LOOP_SET_STATUS{,64}

LOOP_SET_STATUS{,64} can set a lot more flags than it is supposed to
clear (the LOOP_SET_STATUS_CLEARABLE_FLAGS vs
LOOP_SET_STATUS_SETTABLE_FLAGS defines should have been a hint..).

Fix this by only clearing the bits in LOOP_SET_STATUS_CLEARABLE_FLAGS.

Fixes: ae074d07a0e5 ("loop: move updating lo_flag s out of loop_set_status_from_info")
Reported-by: kernel test robot <oliver.sang@intel.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20250127143045.538279-1-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Christoph Hellwig and committed by
Jens Axboe
5aa21b04 e9d8c873

+1 -2
+1 -2
drivers/block/loop.c
··· 1281 1281 partscan = !(lo->lo_flags & LO_FLAGS_PARTSCAN) && 1282 1282 (info->lo_flags & LO_FLAGS_PARTSCAN); 1283 1283 1284 - lo->lo_flags &= ~(LOOP_SET_STATUS_SETTABLE_FLAGS | 1285 - LOOP_SET_STATUS_CLEARABLE_FLAGS); 1284 + lo->lo_flags &= ~LOOP_SET_STATUS_CLEARABLE_FLAGS; 1286 1285 lo->lo_flags |= (info->lo_flags & LOOP_SET_STATUS_SETTABLE_FLAGS); 1287 1286 1288 1287 if (size_changed) {