diff mbox series

[2/2] btrfs: Remove always true condition in btrfs_start_delalloc_roots

Message ID 20210111105812.423915-2-nborisov@suse.com (mailing list archive)
State New, archived
Headers show
Series [1/2] btrfs: Make btrfs_start_delalloc_root's nr argument a long | expand

Commit Message

Nikolay Borisov Jan. 11, 2021, 10:58 a.m. UTC
Following the rework in
"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.

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
 fs/btrfs/inode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series


diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 69e24341afc0..eb0a25e75126 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -9495,7 +9495,7 @@  int btrfs_start_delalloc_roots(struct btrfs_fs_info *fs_info, long nr,
 	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
 		 * flush.