Message ID | 20190416071526.3576-2-wqu@suse.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | btrfs-progs: Handle error properly in btrfs_commit_transaction() | expand |
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; >
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;
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(-)