diff options
author | Christoph Hellwig <hch@lst.de> | 2022-04-15 06:52:41 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-04-17 19:49:58 -0600 |
commit | 9964e674559b02619fee2012a56839624143d02e (patch) | |
tree | b21b0b9b95b1a3339d049e70f6f569d7a5581c1b /mm/swapfile.c | |
parent | f09dac9afb8e3ce4b6485dbc091a9b9c742db023 (diff) | |
download | linux-stable-9964e674559b02619fee2012a56839624143d02e.tar.gz linux-stable-9964e674559b02619fee2012a56839624143d02e.tar.bz2 linux-stable-9964e674559b02619fee2012a56839624143d02e.zip |
mm: use bdev_is_zoned in claim_swapfile
Use the bdev based helper instead of poking into the queue.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Link: https://lore.kernel.org/r/20220415045258.199825-11-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 63c61f8b2611..4c7537162af5 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c @@ -2761,7 +2761,7 @@ static int claim_swapfile(struct swap_info_struct *p, struct inode *inode) * write only restriction. Hence zoned block devices are not * suitable for swapping. Disallow them here. */ - if (blk_queue_is_zoned(p->bdev->bd_disk->queue)) + if (bdev_is_zoned(p->bdev)) return -EINVAL; p->flags |= SWP_BLKDEV; } else if (S_ISREG(inode->i_mode)) { |