File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -480,6 +480,7 @@ static int __btrfs_end_transaction(struct btrfs_trans_handle *trans,
480
480
struct btrfs_transaction * cur_trans = trans -> transaction ;
481
481
struct btrfs_fs_info * info = root -> fs_info ;
482
482
int count = 0 ;
483
+ int err = 0 ;
483
484
484
485
if (-- trans -> use_count ) {
485
486
trans -> block_rsv = trans -> orig_rsv ;
@@ -532,18 +533,18 @@ static int __btrfs_end_transaction(struct btrfs_trans_handle *trans,
532
533
533
534
if (current -> journal_info == trans )
534
535
current -> journal_info = NULL ;
535
- memset (trans , 0 , sizeof (* trans ));
536
- kmem_cache_free (btrfs_trans_handle_cachep , trans );
537
536
538
537
if (throttle )
539
538
btrfs_run_delayed_iputs (root );
540
539
541
540
if (trans -> aborted ||
542
541
root -> fs_info -> fs_state & BTRFS_SUPER_FLAG_ERROR ) {
543
- return - EIO ;
542
+ err = - EIO ;
544
543
}
545
544
546
- return 0 ;
545
+ memset (trans , 0 , sizeof (* trans ));
546
+ kmem_cache_free (btrfs_trans_handle_cachep , trans );
547
+ return err ;
547
548
}
548
549
549
550
int btrfs_end_transaction (struct btrfs_trans_handle * trans ,
You can’t perform that action at this time.
0 commit comments