Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 309926
b: refs/heads/master
c: f395694
h: refs/heads/master
v: v3
  • Loading branch information
Jan Schmidt committed May 31, 2012
1 parent ad15dbb commit c064aa6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e9b7fd4d8b7c915cff353ca085b83bd19737396b
refs/heads/master: f395694c2cd76cb1882fa82dd37e761598367fe9
13 changes: 7 additions & 6 deletions trunk/fs/btrfs/ctree.c
Original file line number Diff line number Diff line change
Expand Up @@ -540,16 +540,19 @@ tree_mod_log_insert_move(struct btrfs_fs_info *fs_info,
int ret;
int i;

ret = tree_mod_alloc(fs_info, flags, &tm);
if (ret <= 0)
return ret;
if (tree_mod_dont_log(fs_info, eb))
return 0;

for (i = 0; i + dst_slot < src_slot && i < nr_items; i++) {
ret = tree_mod_log_insert_key(fs_info, eb, i + dst_slot,
MOD_LOG_KEY_REMOVE_WHILE_MOVING);
BUG_ON(ret < 0);
}

ret = tree_mod_alloc(fs_info, flags, &tm);
if (ret <= 0)
return ret;

tm->index = eb->start >> PAGE_CACHE_SHIFT;
tm->slot = src_slot;
tm->move.dst_slot = dst_slot;
Expand Down Expand Up @@ -4548,9 +4551,7 @@ static void del_ptr(struct btrfs_trans_handle *trans, struct btrfs_root *root,
btrfs_node_key_ptr_offset(slot + 1),
sizeof(struct btrfs_key_ptr) *
(nritems - slot - 1));
}

if (tree_mod_log && level) {
} else if (tree_mod_log && level) {
ret = tree_mod_log_insert_key(root->fs_info, parent, slot,
MOD_LOG_KEY_REMOVE);
BUG_ON(ret < 0);
Expand Down

0 comments on commit c064aa6

Please sign in to comment.