]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
xfs: remove the bt_bdev_file buftarg field
authorChristoph Hellwig <hch@lst.de>
Fri, 23 May 2025 12:31:28 +0000 (14:31 +0200)
committerCarlos Maiolino <cem@kernel.org>
Tue, 8 Jul 2025 11:30:26 +0000 (13:30 +0200)
And use bt_file for both bdev and shmem backed buftargs.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: John Garry <john.g.garry@oracle.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
fs/xfs/xfs_buf.c
fs/xfs/xfs_buf.h

index edae4733a72fd7b7ce0ca0f402848cda25a7a7f1..f9ef3b2a332a6fb4a8c55323dd4171c0e3e86061 100644 (file)
@@ -1683,7 +1683,7 @@ xfs_free_buftarg(
        fs_put_dax(btp->bt_daxdev, btp->bt_mount);
        /* the main block device is closed by kill_block_super */
        if (btp->bt_bdev != btp->bt_mount->m_super->s_bdev)
-               bdev_fput(btp->bt_bdev_file);
+               bdev_fput(btp->bt_file);
        kfree(btp);
 }
 
@@ -1798,7 +1798,7 @@ xfs_alloc_buftarg(
        btp = kzalloc(sizeof(*btp), GFP_KERNEL | __GFP_NOFAIL);
 
        btp->bt_mount = mp;
-       btp->bt_bdev_file = bdev_file;
+       btp->bt_file = bdev_file;
        btp->bt_bdev = file_bdev(bdev_file);
        btp->bt_dev = btp->bt_bdev->bd_dev;
        btp->bt_daxdev = fs_dax_get_by_bdev(btp->bt_bdev, &btp->bt_dax_part_off,
index 7987a6d648746eabb09d1cf61944f424516d4c0c..b269e115d9ace0f3c08ed30952b1d039a4d8536f 100644 (file)
@@ -94,7 +94,6 @@ void xfs_buf_cache_destroy(struct xfs_buf_cache *bch);
  */
 struct xfs_buftarg {
        dev_t                   bt_dev;
-       struct file             *bt_bdev_file;
        struct block_device     *bt_bdev;
        struct dax_device       *bt_daxdev;
        struct file             *bt_file;