[1/3] btrfs-progs: Remove the dead branch in btrfs_run_delayed_refs()
diff mbox series

Message ID 20190416071526.3576-2-wqu@suse.com
State New
Headers show
Series
  • btrfs-progs: Handle error properly in btrfs_commit_transaction()
Related show

Commit Message

Qu Wenruo April 16, 2019, 7:15 a.m. UTC
cleanup_ref_head() will only return 0 or 1, no way to return minutes
value.

So remove the dead branch.

Signed-off-by: Qu Wenruo <wqu@suse.com>
---
 extent-tree.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Nikolay Borisov April 16, 2019, 7:36 a.m. UTC | #1
On 16.04.19 г. 10:15 ч., Qu Wenruo wrote:
> cleanup_ref_head() will only return 0 or 1, no way to return minutes
> value.
> 
> So remove the dead branch.
> 
> Signed-off-by: Qu Wenruo <wqu@suse.com>

This is a left-over from the kernel copy, due to the kernel version able
to return < 0 from, say, run_and_cleanup_extent_op.

Reviewed-by: Nikolay Borisov <nborisov@suse.com>
> ---
>  extent-tree.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/extent-tree.c b/extent-tree.c
> index 8c9cdeff3b02..b7ece0ccc237 100644
> --- a/extent-tree.c
> +++ b/extent-tree.c
> @@ -4235,8 +4235,6 @@ int btrfs_run_delayed_refs(struct btrfs_trans_handle *trans, unsigned long nr)
>  				/* We dropped our lock, we need to loop. */
>  				ret = 0;
>  				continue;
> -			} else if (ret) {
> -				return ret;
>  			}
>  			locked_ref = NULL;
>  			continue;
>

Patch
diff mbox series

diff --git a/extent-tree.c b/extent-tree.c
index 8c9cdeff3b02..b7ece0ccc237 100644
--- a/extent-tree.c
+++ b/extent-tree.c
@@ -4235,8 +4235,6 @@  int btrfs_run_delayed_refs(struct btrfs_trans_handle *trans, unsigned long nr)
 				/* We dropped our lock, we need to loop. */
 				ret = 0;
 				continue;
-			} else if (ret) {
-				return ret;
 			}
 			locked_ref = NULL;
 			continue;