[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 10/27] mm: use bdev_is_zoned in claim_swapfile
 
- To: Jens Axboe <axboe@xxxxxxxxx>
 
- From: Christoph Hellwig <hch@xxxxxx>
 
- Date: Fri, 15 Apr 2022 06:52:41 +0200
 
- Cc: dm-devel@xxxxxxxxxx,	linux-xfs@xxxxxxxxxxxxxxx,	linux-fsdevel@xxxxxxxxxxxxxxx,	linux-um@xxxxxxxxxxxxxxxxxxx,	linux-block@xxxxxxxxxxxxxxx,	drbd-dev@xxxxxxxxxxxxxxxx,	nbd@xxxxxxxxxxxxxxxx,	ceph-devel@xxxxxxxxxxxxxxx,	virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx,	xen-devel@xxxxxxxxxxxxxxxxxxxx,	linux-bcache@xxxxxxxxxxxxxxx,	linux-raid@xxxxxxxxxxxxxxx,	linux-mmc@xxxxxxxxxxxxxxx,	linux-mtd@xxxxxxxxxxxxxxxxxxx,	linux-nvme@xxxxxxxxxxxxxxxxxxx,	linux-s390@xxxxxxxxxxxxxxx,	linux-scsi@xxxxxxxxxxxxxxx,	target-devel@xxxxxxxxxxxxxxx,	linux-btrfs@xxxxxxxxxxxxxxx,	linux-ext4@xxxxxxxxxxxxxxx,	linux-f2fs-devel@xxxxxxxxxxxxxxxxxxxxx,	cluster-devel@xxxxxxxxxx,	jfs-discussion@xxxxxxxxxxxxxxxxxxxxx,	linux-nilfs@xxxxxxxxxxxxxxx,	ntfs3@xxxxxxxxxxxxxxx,	ocfs2-devel@xxxxxxxxxxxxxx,	linux-mm@xxxxxxxxx
 
- Delivery-date: Fri, 15 Apr 2022 05:02:23 +0000
 
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
 
 
 
Use the bdev based helper instead of poking into the queue.
Signed-off-by: Christoph Hellwig <hch@xxxxxx>
---
 mm/swapfile.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/swapfile.c b/mm/swapfile.c
index 63c61f8b26118..4c7537162af5e 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)) {
-- 
2.30.2
 
    
     |