Skip to content

Commit 9b027aa

Browse files
Christoph Hellwigcmaiolino
authored andcommitted
xfs: remove the bt_bdev_file buftarg field
And use bt_file for both bdev and shmem backed buftargs. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: John Garry <[email protected]> Reviewed-by: Darrick J. Wong <[email protected]> Signed-off-by: Carlos Maiolino <[email protected]>
1 parent 988a168 commit 9b027aa

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

fs/xfs/xfs_buf.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1683,7 +1683,7 @@ xfs_free_buftarg(
16831683
fs_put_dax(btp->bt_daxdev, btp->bt_mount);
16841684
/* the main block device is closed by kill_block_super */
16851685
if (btp->bt_bdev != btp->bt_mount->m_super->s_bdev)
1686-
bdev_fput(btp->bt_bdev_file);
1686+
bdev_fput(btp->bt_file);
16871687
kfree(btp);
16881688
}
16891689

@@ -1798,7 +1798,7 @@ xfs_alloc_buftarg(
17981798
btp = kzalloc(sizeof(*btp), GFP_KERNEL | __GFP_NOFAIL);
17991799

18001800
btp->bt_mount = mp;
1801-
btp->bt_bdev_file = bdev_file;
1801+
btp->bt_file = bdev_file;
18021802
btp->bt_bdev = file_bdev(bdev_file);
18031803
btp->bt_dev = btp->bt_bdev->bd_dev;
18041804
btp->bt_daxdev = fs_dax_get_by_bdev(btp->bt_bdev, &btp->bt_dax_part_off,

fs/xfs/xfs_buf.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ void xfs_buf_cache_destroy(struct xfs_buf_cache *bch);
9494
*/
9595
struct xfs_buftarg {
9696
dev_t bt_dev;
97-
struct file *bt_bdev_file;
9897
struct block_device *bt_bdev;
9998
struct dax_device *bt_daxdev;
10099
struct file *bt_file;

0 commit comments

Comments
 (0)