diff options
author | Christoph Hellwig <hch@lst.de> | 2022-04-15 06:52:45 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-04-18 03:49:59 +0200 |
commit | 36d254893aa6a6e204075c3cce94bb572ac32c04 (patch) | |
tree | b4f9198da60eca095cbb05f8fb63ad243efca2ee /mm/swapfile.c | |
parent | block: add a bdev_fua helper (diff) | |
download | linux-36d254893aa6a6e204075c3cce94bb572ac32c04.tar.xz linux-36d254893aa6a6e204075c3cce94bb572ac32c04.zip |
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 'mm/swapfile.c')
-rw-r--r-- | mm/swapfile.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/swapfile.c b/mm/swapfile.c index d5ab7ec4d92c..4069f17a82c8 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c @@ -3065,7 +3065,7 @@ SYSCALL_DEFINE2(swapon, const char __user *, specialfile, int, swap_flags) goto bad_swap_unlock_inode; } - if (p->bdev && blk_queue_stable_writes(p->bdev->bd_disk->queue)) + if (p->bdev && bdev_stable_writes(p->bdev)) p->flags |= SWP_STABLE_WRITES; if (p->bdev && p->bdev->bd_disk->fops->rw_page) |