]> git.baikalelectronics.ru Git - kernel.git/commit
block: check if a profile is actually registered in blk_integrity_unregister
authorChristoph Hellwig <hch@lst.de>
Tue, 14 Sep 2021 07:06:55 +0000 (09:06 +0200)
committerJens Axboe <axboe@kernel.dk>
Wed, 15 Sep 2021 02:03:30 +0000 (20:03 -0600)
commit3074de6d521346c09d893d82e4397dc8fd07de6a
treebc9ed35cb80f91b84d1974ea8272c5525af2eddb
parent5407b49a7377079a27a8d7fcc8dad2ea3ce157e1
block: check if a profile is actually registered in blk_integrity_unregister

While clearing the profile itself is harmless, we really should not clear
the stable writes flag if it wasn't set due to a registered integrity
profile.

Reported-by: Lihong Kou <koulihong@huawei.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Link: https://lore.kernel.org/r/20210914070657.87677-2-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-integrity.c