]> www.infradead.org Git - nvme.git/commit
md: Fix linear_set_limits()
authorBart Van Assche <bvanassche@acm.org>
Wed, 29 Jan 2025 22:56:35 +0000 (14:56 -0800)
committerSong Liu <song@kernel.org>
Fri, 31 Jan 2025 18:18:50 +0000 (10:18 -0800)
commita572593ac80e51eb69ecede7e614289fcccdbf8d
tree2471d031d4a5d77276bd6ad09051478ad6d0b0a3
parent1e1a9cecfab3f22ebef0a976f849c87be8d03c1c
md: Fix linear_set_limits()

queue_limits_cancel_update() must only be called if
queue_limits_start_update() is called first. Remove the
queue_limits_cancel_update() call from linear_set_limits() because
there is no corresponding queue_limits_start_update() call.

This bug was discovered by annotating all mutex operations with clang
thread-safety attributes and by building the kernel with clang and
-Wthread-safety.

Cc: Yu Kuai <yukuai3@huawei.com>
Cc: Coly Li <colyli@kernel.org>
Cc: Mike Snitzer <snitzer@kernel.org>
Cc: Christoph Hellwig <hch@lst.de>
Fixes: 127186cfb184 ("md: reintroduce md-linear")
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20250129225636.2667932-1-bvanassche@acm.org
Signed-off-by: Song Liu <song@kernel.org>
drivers/md/md-linear.c