diff options
author | Christoph Hellwig <hch@lst.de> | 2021-10-19 09:25:27 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-10-22 17:36:55 +0300 |
commit | 1226dfff572f8878fdfc4ac2fd84a59c7a75f489 (patch) | |
tree | ce188cf650adf7de982a813e0c14abe61237b400 /fs/btrfs/volumes.c | |
parent | d39b0a2fae366793e707bbd576eea055b7e9db9f (diff) | |
download | linux-1226dfff572f8878fdfc4ac2fd84a59c7a75f489.tar.xz |
btrfs: use sync_blockdev
Use sync_blockdev instead of opencoding it.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Acked-by: David Sterba <dsterba@suse.com>
Link: https://lore.kernel.org/r/20211019062530.2174626-5-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/btrfs/volumes.c')
-rw-r--r-- | fs/btrfs/volumes.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 2ec3b8ac8fa3..b51e4b464103 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -508,7 +508,7 @@ btrfs_get_bdev_and_sb(const char *device_path, fmode_t flags, void *holder, } if (flush) - filemap_write_and_wait((*bdev)->bd_inode->i_mapping); + sync_blockdev(*bdev); ret = set_blocksize(*bdev, BTRFS_BDEV_BLOCKSIZE); if (ret) { blkdev_put(*bdev, flags); |