OSDN Git Service

btrfs: qgroup: Finish rescan when hit the last leaf of extent tree
[sagit-ice-cold/kernel_xiaomi_msm8998.git] / fs / btrfs / super.c
index fe609b8..3bd2233 100644 (file)
@@ -239,7 +239,7 @@ void __btrfs_abort_transaction(struct btrfs_trans_handle *trans,
        trans->aborted = errno;
        /* Nothing used. The other threads that have joined this
         * transaction may be able to continue. */
-       if (!trans->blocks_used && list_empty(&trans->new_bgs)) {
+       if (!trans->dirty && list_empty(&trans->new_bgs)) {
                const char *errstr;
 
                errstr = btrfs_decode_error(errno);
@@ -1727,6 +1727,8 @@ static int btrfs_remount(struct super_block *sb, int *flags, char *data)
                        goto restore;
                }
 
+               btrfs_qgroup_rescan_resume(fs_info);
+
                if (!fs_info->uuid_root) {
                        btrfs_info(fs_info, "creating UUID tree");
                        ret = btrfs_create_uuid_tree(fs_info);