summaryrefslogtreecommitdiff
path: root/fs/btrfs/delalloc-space.c
diff options
context:
space:
mode:
authorJosef Bacik <josef@toxicpanda.com>2023-09-18 21:15:33 +0300
committerDavid Sterba <dsterba@suse.com>2023-10-12 17:44:08 +0300
commit11aeb97b45ad2e0040cbb2a589bc403152526345 (patch)
treeaf143b0b9cd1c0e2e06c1ead4c387f10414a4102 /fs/btrfs/delalloc-space.c
parentc967c19ea6d5a7c79da53394694b1c38a7e1712f (diff)
downloadlinux-11aeb97b45ad2e0040cbb2a589bc403152526345.tar.xz
btrfs: don't arbitrarily slow down delalloc if we're committing
We have a random schedule_timeout() if the current transaction is committing, which seems to be a holdover from the original delalloc reservation code. Remove this, we have the proper flushing stuff, we shouldn't be hoping for random timing things to make everything work. This just induces latency for no reason. CC: stable@vger.kernel.org # 5.4+ Signed-off-by: Josef Bacik <josef@toxicpanda.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/delalloc-space.c')
-rw-r--r--fs/btrfs/delalloc-space.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/fs/btrfs/delalloc-space.c b/fs/btrfs/delalloc-space.c
index a764db67c033..51453d4928fa 100644
--- a/fs/btrfs/delalloc-space.c
+++ b/fs/btrfs/delalloc-space.c
@@ -322,9 +322,6 @@ int btrfs_delalloc_reserve_metadata(struct btrfs_inode *inode, u64 num_bytes,
} else {
if (current->journal_info)
flush = BTRFS_RESERVE_FLUSH_LIMIT;
-
- if (btrfs_transaction_in_commit(fs_info))
- schedule_timeout(1);
}
num_bytes = ALIGN(num_bytes, fs_info->sectorsize);