Commit 1e8a4237 authored by Anand Jain's avatar Anand Jain Committed by David Sterba

btrfs: rename werr and err to ret in __btrfs_wait_marked_extents()

Rename the function's local return variables err and werr to ret.
Also, align the variable declarations with the other declarations in
the function for better function space alignment.
Signed-off-by: default avatarAnand Jain <anand.jain@oracle.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent ce875311
...@@ -1171,12 +1171,11 @@ int btrfs_write_marked_extents(struct btrfs_fs_info *fs_info, ...@@ -1171,12 +1171,11 @@ int btrfs_write_marked_extents(struct btrfs_fs_info *fs_info,
static int __btrfs_wait_marked_extents(struct btrfs_fs_info *fs_info, static int __btrfs_wait_marked_extents(struct btrfs_fs_info *fs_info,
struct extent_io_tree *dirty_pages) struct extent_io_tree *dirty_pages)
{ {
int err = 0;
int werr = 0;
struct address_space *mapping = fs_info->btree_inode->i_mapping; struct address_space *mapping = fs_info->btree_inode->i_mapping;
struct extent_state *cached_state = NULL; struct extent_state *cached_state = NULL;
u64 start = 0; u64 start = 0;
u64 end; u64 end;
int ret = 0;
while (find_first_extent_bit(dirty_pages, start, &start, &end, while (find_first_extent_bit(dirty_pages, start, &start, &end,
EXTENT_NEED_WAIT, &cached_state)) { EXTENT_NEED_WAIT, &cached_state)) {
...@@ -1188,24 +1187,20 @@ static int __btrfs_wait_marked_extents(struct btrfs_fs_info *fs_info, ...@@ -1188,24 +1187,20 @@ static int __btrfs_wait_marked_extents(struct btrfs_fs_info *fs_info,
* concurrently - we do it only at transaction commit time when * concurrently - we do it only at transaction commit time when
* it's safe to do it (through extent_io_tree_release()). * it's safe to do it (through extent_io_tree_release()).
*/ */
err = clear_extent_bit(dirty_pages, start, end, ret = clear_extent_bit(dirty_pages, start, end,
EXTENT_NEED_WAIT, &cached_state); EXTENT_NEED_WAIT, &cached_state);
if (err == -ENOMEM) if (ret == -ENOMEM)
err = 0; ret = 0;
if (!err) if (!ret)
err = filemap_fdatawait_range(mapping, start, end); ret = filemap_fdatawait_range(mapping, start, end);
if (err)
werr = err;
free_extent_state(cached_state); free_extent_state(cached_state);
if (werr) if (ret)
break; break;
cached_state = NULL; cached_state = NULL;
cond_resched(); cond_resched();
start = end + 1; start = end + 1;
} }
if (err) return ret;
werr = err;
return werr;
} }
static int btrfs_wait_extents(struct btrfs_fs_info *fs_info, static int btrfs_wait_extents(struct btrfs_fs_info *fs_info,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment