diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index c3254c995fc880c7d6dcbc06d1cbfb24dd4e2c09..88f812eddff6c9f353fddd0d06415fb90b75cf78 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -161,10 +161,9 @@ void __btrfs_std_error(struct btrfs_fs_info *fs_info, const char *function, } /* Don't go through full error handling during mount */ - if (sb->s_flags & MS_BORN) { - save_error_info(fs_info); + save_error_info(fs_info); + if (sb->s_flags & MS_BORN) btrfs_handle_error(fs_info); - } } static const char * const logtypes[] = { diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index 9940fd90a958b512b711c6304f0d6d6a4f2f1e2a..a5764aeb45498d68226004698f22e4bf0b520cc7 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c @@ -1487,6 +1487,10 @@ static void cleanup_transaction(struct btrfs_trans_handle *trans, current->journal_info = NULL; kmem_cache_free(btrfs_trans_handle_cachep, trans); + + spin_lock(&root->fs_info->trans_lock); + root->fs_info->trans_no_join = 0; + spin_unlock(&root->fs_info->trans_lock); } static int btrfs_flush_all_pending_stuffs(struct btrfs_trans_handle *trans,