Skip to content

Commit cb88708

Browse files
committed
Merge tag 'for-chris' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux into for-linus-4.8
2 parents 28a2359 + e0af248 commit cb88708

File tree

3 files changed

+15
-11
lines changed

3 files changed

+15
-11
lines changed

fs/btrfs/extent-tree.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4901,18 +4901,18 @@ btrfs_calc_reclaim_metadata_size(struct btrfs_root *root,
49014901
u64 expected;
49024902
u64 to_reclaim = 0;
49034903

4904-
to_reclaim = min_t(u64, num_online_cpus() * SZ_1M, SZ_16M);
4905-
if (can_overcommit(root, space_info, to_reclaim,
4906-
BTRFS_RESERVE_FLUSH_ALL))
4907-
return 0;
4908-
49094904
list_for_each_entry(ticket, &space_info->tickets, list)
49104905
to_reclaim += ticket->bytes;
49114906
list_for_each_entry(ticket, &space_info->priority_tickets, list)
49124907
to_reclaim += ticket->bytes;
49134908
if (to_reclaim)
49144909
return to_reclaim;
49154910

4911+
to_reclaim = min_t(u64, num_online_cpus() * SZ_1M, SZ_16M);
4912+
if (can_overcommit(root, space_info, to_reclaim,
4913+
BTRFS_RESERVE_FLUSH_ALL))
4914+
return 0;
4915+
49164916
used = space_info->bytes_used + space_info->bytes_reserved +
49174917
space_info->bytes_pinned + space_info->bytes_readonly +
49184918
space_info->bytes_may_use;

fs/btrfs/relocation.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4200,9 +4200,11 @@ static noinline_for_stack int relocate_block_group(struct reloc_control *rc)
42004200
err = PTR_ERR(trans);
42014201
goto out_free;
42024202
}
4203-
err = qgroup_fix_relocated_data_extents(trans, rc);
4204-
if (err < 0) {
4205-
btrfs_abort_transaction(trans, err);
4203+
ret = qgroup_fix_relocated_data_extents(trans, rc);
4204+
if (ret < 0) {
4205+
btrfs_abort_transaction(trans, ret);
4206+
if (!err)
4207+
err = ret;
42064208
goto out_free;
42074209
}
42084210
btrfs_commit_transaction(trans, rc->extent_root);

fs/btrfs/send.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4268,10 +4268,12 @@ static int process_all_refs(struct send_ctx *sctx,
42684268
}
42694269
btrfs_release_path(path);
42704270

4271+
/*
4272+
* We don't actually care about pending_move as we are simply
4273+
* re-creating this inode and will be rename'ing it into place once we
4274+
* rename the parent directory.
4275+
*/
42714276
ret = process_recorded_refs(sctx, &pending_move);
4272-
/* Only applicable to an incremental send. */
4273-
ASSERT(pending_move == 0);
4274-
42754277
out:
42764278
btrfs_free_path(path);
42774279
return ret;

0 commit comments

Comments
 (0)