diff options
author | Damien Le Moal <damien.lemoal@wdc.com> | 2021-01-28 15:36:19 +0900 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-01-28 07:31:50 -0700 |
commit | 0fe37724f8e70fa4cb72948f60fca553702df768 (patch) | |
tree | 3094f7e80c8206dd1842188de08e9c25b459a1dc /drivers/md/bcache/features.h | |
parent | 6c635caef410aa757befbd8857c1eadde5cc22ed (diff) | |
download | linux-0fe37724f8e70fa4cb72948f60fca553702df768.tar.gz linux-0fe37724f8e70fa4cb72948f60fca553702df768.tar.bz2 linux-0fe37724f8e70fa4cb72948f60fca553702df768.zip |
block: fix bd_size_lock use
Some block device drivers, e.g. the skd driver, call set_capacity() with
IRQ disabled. This results in lockdep ito complain about inconsistent
lock states ("inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage")
because set_capacity takes a block device bd_size_lock using the
functions spin_lock() and spin_unlock(). Ensure a consistent locking
state by replacing these calls with spin_lock_irqsave() and
spin_lock_irqrestore(). The same applies to bdev_set_nr_sectors().
With this fix, all lockdep complaints are resolved.
Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/md/bcache/features.h')
0 files changed, 0 insertions, 0 deletions