Commit fdba66e
committed
btrfs: avoid transaction commit on error in insert_balance_item()
There's no point in committing the transaction if we failed to insert the
balance item, since we haven't done anything else after we started/joined
the transaction. Also stop using two variables for tracking the return
value and use only 'ret'.
Reviewed-by: Daniel Vacek <neelx@suse.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>1 parent 217b58b commit fdba66e
1 file changed
+6
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3642 | 3642 | | |
3643 | 3643 | | |
3644 | 3644 | | |
3645 | | - | |
| 3645 | + | |
3646 | 3646 | | |
3647 | 3647 | | |
3648 | 3648 | | |
| |||
3677 | 3677 | | |
3678 | 3678 | | |
3679 | 3679 | | |
3680 | | - | |
3681 | | - | |
3682 | | - | |
| 3680 | + | |
| 3681 | + | |
| 3682 | + | |
| 3683 | + | |
| 3684 | + | |
3683 | 3685 | | |
3684 | 3686 | | |
3685 | 3687 | | |
| |||
0 commit comments