Message ID | 20211019062530.2174626-5-hch@lst.de (mailing list archive) |
---|---|
State | Accepted |
Commit | 1226dfff572f8878fdfc4ac2fd84a59c7a75f489 |
Headers | show |
Series | [1/7] fs: remove __sync_filesystem | expand |
On 10/18/2021 11:25 PM, Christoph Hellwig wrote: > Use sync_blockdev instead of opencoding it. > > Signed-off-by: Christoph Hellwig <hch@lst.de> Looks good. Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
On Tue, Oct 19, 2021 at 08:25:27AM +0200, Christoph Hellwig wrote: > Use sync_blockdev instead of opencoding it. > > Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: David Sterba <dsterba@suse.com>
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 2ec3b8ac8fa35..b51e4b464103e 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);
Use sync_blockdev instead of opencoding it. Signed-off-by: Christoph Hellwig <hch@lst.de> --- fs/btrfs/volumes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)