]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Btrfs: Use blk_congestion_wait on older kernels
authorChris Mason <chris.mason@oracle.com>
Thu, 17 Jan 2008 17:01:41 +0000 (12:01 -0500)
committerChris Mason <chris.mason@oracle.com>
Thu, 25 Sep 2008 15:03:59 +0000 (11:03 -0400)
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/disk-io.c

index cd29922d40738845915202e051bce0496d103a55..731a534f81f561de58c6fdd97d14448b2ac8f9d6 100644 (file)
@@ -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)