btrfs: adjust while loop condition in run_delalloc_nocow
authorJosef Bacik <josef@toxicpanda.com>
Mon, 12 Feb 2024 21:27:15 +0000 (16:27 -0500)
committerDavid Sterba <dsterba@suse.com>
Tue, 7 May 2024 19:31:09 +0000 (21:31 +0200)
commit0ed30c17f699d5df73c445999b0114c5859d1145
tree24167ec2878c09fc8b1d17f590a152a4629ed96e
parent7c9acd440f4d1124122639928ac4ff69082bbd3a
btrfs: adjust while loop condition in run_delalloc_nocow

We have the following pattern

while (1) {
if (cur_offset > end)
break;
}

Which is just

while (cur_offset <= end) {
...
}

so adjust the code to be more clear.

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