summaryrefslogtreecommitdiff
path: root/drivers/md/dm-table.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2022-04-15 07:52:45 +0300
committerJens Axboe <axboe@kernel.dk>2022-04-18 04:49:59 +0300
commit36d254893aa6a6e204075c3cce94bb572ac32c04 (patch)
treeb4f9198da60eca095cbb05f8fb63ad243efca2ee /drivers/md/dm-table.c
parenta557e82e5a01826f902bd94fc925c03f253cb712 (diff)
downloadlinux-36d254893aa6a6e204075c3cce94bb572ac32c04.tar.xz
block: add a bdev_stable_writes helper
Add a helper to check the stable writes flag based on the block_device instead of having to poke into the block layer internal request_queue. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com> Link: https://lore.kernel.org/r/20220415045258.199825-15-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/md/dm-table.c')
-rw-r--r--drivers/md/dm-table.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c
index 5e38d0dd009d..d46839faa0ca 100644
--- a/drivers/md/dm-table.c
+++ b/drivers/md/dm-table.c
@@ -1950,9 +1950,7 @@ static int device_requires_stable_pages(struct dm_target *ti,
struct dm_dev *dev, sector_t start,
sector_t len, void *data)
{
- struct request_queue *q = bdev_get_queue(dev->bdev);
-
- return blk_queue_stable_writes(q);
+ return bdev_stable_writes(dev->bdev);
}
int dm_table_set_restrictions(struct dm_table *t, struct request_queue *q,