btrfs: fix truncate throttling
authorJosef Bacik <josef@toxicpanda.com>
Mon, 3 Dec 2018 15:20:38 +0000 (10:20 -0500)
committerDavid Sterba <dsterba@suse.com>
Mon, 17 Dec 2018 13:51:47 +0000 (14:51 +0100)
commit28bad2125767c51a2974c234470981b39d3623ab
tree9a4efca6dcae04b146ad53b93edd37e59321ec08
parentdb2462a6ad3dc490ac33250042e728226ef3ba00
btrfs: fix truncate throttling

We have a bunch of magic to make sure we're throttling delayed refs when
truncating a file.  Now that we have a delayed refs rsv and a mechanism
for refilling that reserve simply use that instead of all of this magic.

Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/inode.c