diff options
author | Christoph Hellwig <hch@lst.de> | 2023-08-09 15:05:38 -0700 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2023-08-10 10:34:54 +0200 |
commit | 35a93b148b0363dca23c3db1cc9d48100eb8b276 (patch) | |
tree | d7cf3ee01ec49c0903f2450aaebfafdc6b0cfc41 /fs/xfs/xfs_buf.c | |
parent | 41233576e9a4515dc9b0bd1cbbb896b520a1f486 (diff) | |
download | lwn-35a93b148b0363dca23c3db1cc9d48100eb8b276.tar.gz lwn-35a93b148b0363dca23c3db1cc9d48100eb8b276.zip |
xfs: close the external block devices in xfs_mount_free
blkdev_put must not be called under sb->s_umount to avoid a lock order
reversal with disk->open_mutex. Move closing the buftargs into ->kill_sb
to archive that. Note that the flushing of the disk caches and
block device mapping invalidated needs to stay in ->put_super as the main
block device is closed in kill_block_super already.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Message-Id: <20230809220545.1308228-7-hch@lst.de>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/xfs/xfs_buf.c')
-rw-r--r-- | fs/xfs/xfs_buf.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c index 65110df78e13..f2e5a2c78dc4 100644 --- a/fs/xfs/xfs_buf.c +++ b/fs/xfs/xfs_buf.c @@ -1945,8 +1945,6 @@ xfs_free_buftarg( percpu_counter_destroy(&btp->bt_io_count); list_lru_destroy(&btp->bt_lru); - blkdev_issue_flush(btp->bt_bdev); - invalidate_bdev(btp->bt_bdev); fs_put_dax(btp->bt_daxdev, btp->bt_mount); /* the main block device is closed by kill_block_super */ if (bdev != btp->bt_mount->m_super->s_bdev) |