mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-29 23:53:32 +00:00
btrfs: remove always true condition in btrfs_start_delalloc_roots
Following the rework in e076ab2a2c
("btrfs: shrink delalloc pages
instead of full inodes") the nr variable is no longer passed by
reference to start_delalloc_inodes hence it cannot change. Additionally
we are always guaranteed for it to be positive number hence it's
redundant to have it as a condition in the loop. Simply remove that
usage.
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
9db4dc241e
commit
d7830b7155
1 changed files with 1 additions and 1 deletions
|
@ -9510,7 +9510,7 @@ int btrfs_start_delalloc_roots(struct btrfs_fs_info *fs_info, long nr,
|
||||||
mutex_lock(&fs_info->delalloc_root_mutex);
|
mutex_lock(&fs_info->delalloc_root_mutex);
|
||||||
spin_lock(&fs_info->delalloc_root_lock);
|
spin_lock(&fs_info->delalloc_root_lock);
|
||||||
list_splice_init(&fs_info->delalloc_roots, &splice);
|
list_splice_init(&fs_info->delalloc_roots, &splice);
|
||||||
while (!list_empty(&splice) && nr) {
|
while (!list_empty(&splice)) {
|
||||||
/*
|
/*
|
||||||
* Reset nr_to_write here so we know that we're doing a full
|
* Reset nr_to_write here so we know that we're doing a full
|
||||||
* flush.
|
* flush.
|
||||||
|
|
Loading…
Reference in a new issue