mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-18 12:46:11 +07:00
Btrfs: Use blk_congestion_wait on older kernels
Signed-off-by: Chris Mason <chris.mason@oracle.com>
This commit is contained in:
parent
fb4bc1e056
commit
04005cc7a1
@ -919,8 +919,13 @@ void btrfs_throttle(struct btrfs_root *root)
|
||||
struct backing_dev_info *bdi;
|
||||
|
||||
bdi = root->fs_info->sb->s_bdev->bd_inode->i_mapping->backing_dev_info;
|
||||
if (root->fs_info->throttles && bdi_write_congested(bdi))
|
||||
if (root->fs_info->throttles && bdi_write_congested(bdi)) {
|
||||
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,18)
|
||||
congestion_wait(WRITE, HZ/20);
|
||||
#else
|
||||
blk_congestion_wait(WRITE, HZ/20);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
void btrfs_btree_balance_dirty(struct btrfs_root *root, unsigned long nr)
|
||||
|
Loading…
Reference in New Issue
Block a user