diff options
author | Anand Jain <anand.jain@oracle.com> | 2024-03-19 20:25:20 +0530 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2024-05-07 21:31:07 +0200 |
commit | ce87531120aea7953706c63f1622ebcdfcd257d1 (patch) | |
tree | be6c7c909252a0e2649e632446130d3a23941a93 | |
parent | 9a7b68d32afc4e92909c21e166ad993801236be3 (diff) | |
download | linux-stable-ce87531120aea7953706c63f1622ebcdfcd257d1.tar.gz linux-stable-ce87531120aea7953706c63f1622ebcdfcd257d1.tar.bz2 linux-stable-ce87531120aea7953706c63f1622ebcdfcd257d1.zip |
btrfs: rename werr and err to ret in btrfs_write_marked_extents()
Rename the function's local variable werr and err to ret.
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r-- | fs/btrfs/transaction.c | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index 8c3b3cda1390..defdb0979d68 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c @@ -1118,8 +1118,7 @@ int btrfs_end_transaction_throttle(struct btrfs_trans_handle *trans) int btrfs_write_marked_extents(struct btrfs_fs_info *fs_info, struct extent_io_tree *dirty_pages, int mark) { - int err = 0; - int werr = 0; + int ret = 0; struct address_space *mapping = fs_info->btree_inode->i_mapping; struct extent_state *cached_state = NULL; u64 start = 0; @@ -1129,7 +1128,7 @@ int btrfs_write_marked_extents(struct btrfs_fs_info *fs_info, mark, &cached_state)) { bool wait_writeback = false; - err = convert_extent_bit(dirty_pages, start, end, + ret = convert_extent_bit(dirty_pages, start, end, EXTENT_NEED_WAIT, mark, &cached_state); /* @@ -1145,24 +1144,22 @@ int btrfs_write_marked_extents(struct btrfs_fs_info *fs_info, * We cleanup any entries left in the io tree when committing * the transaction (through extent_io_tree_release()). */ - if (err == -ENOMEM) { - err = 0; + if (ret == -ENOMEM) { + ret = 0; wait_writeback = true; } - if (!err) - err = filemap_fdatawrite_range(mapping, start, end); - if (err) - werr = err; - else if (wait_writeback) - werr = filemap_fdatawait_range(mapping, start, end); + if (!ret) + ret = filemap_fdatawrite_range(mapping, start, end); + if (!ret && wait_writeback) + ret = filemap_fdatawait_range(mapping, start, end); free_extent_state(cached_state); - if (werr) + if (ret) break; cached_state = NULL; cond_resched(); start = end + 1; } - return werr; + return ret; } /* |