mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 00:22:00 +02:00
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>
This commit is contained in:
parent
7c9acd440f
commit
0ed30c17f6
|
|
@ -1988,7 +1988,7 @@ static noinline int run_delalloc_nocow(struct btrfs_inode *inode,
|
|||
nocow_args.end = end;
|
||||
nocow_args.writeback_path = true;
|
||||
|
||||
while (1) {
|
||||
while (cur_offset <= end) {
|
||||
struct btrfs_block_group *nocow_bg = NULL;
|
||||
struct btrfs_ordered_extent *ordered;
|
||||
struct btrfs_key found_key;
|
||||
|
|
@ -2192,8 +2192,6 @@ static noinline int run_delalloc_nocow(struct btrfs_inode *inode,
|
|||
*/
|
||||
if (ret)
|
||||
goto error;
|
||||
if (cur_offset > end)
|
||||
break;
|
||||
}
|
||||
btrfs_release_path(path);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user