diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-06-20 11:25:44 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-06-20 11:25:44 -0400 |
commit | af52739b922f656eb1f39016fabaabe4baeda2e2 (patch) | |
tree | 79a7aa810d0493cd0cf4adebac26d37f12e8b545 /fs/btrfs/ctree.c | |
parent | 25ed6a5e97809129a1bc852b6b5c7d03baa112c4 (diff) | |
parent | 33688abb2802ff3a230bd2441f765477b94cc89e (diff) |
Merge 4.7-rc4 into staging-next
We want the fixes in here, and we can resolve a merge issue in
drivers/iio/industrialio-trigger.c
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/btrfs/ctree.c')
-rw-r--r-- | fs/btrfs/ctree.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index 427c36b430a6..6276add8538a 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c | |||
@@ -1373,7 +1373,8 @@ tree_mod_log_rewind(struct btrfs_fs_info *fs_info, struct btrfs_path *path, | |||
1373 | 1373 | ||
1374 | if (tm->op == MOD_LOG_KEY_REMOVE_WHILE_FREEING) { | 1374 | if (tm->op == MOD_LOG_KEY_REMOVE_WHILE_FREEING) { |
1375 | BUG_ON(tm->slot != 0); | 1375 | BUG_ON(tm->slot != 0); |
1376 | eb_rewin = alloc_dummy_extent_buffer(fs_info, eb->start); | 1376 | eb_rewin = alloc_dummy_extent_buffer(fs_info, eb->start, |
1377 | eb->len); | ||
1377 | if (!eb_rewin) { | 1378 | if (!eb_rewin) { |
1378 | btrfs_tree_read_unlock_blocking(eb); | 1379 | btrfs_tree_read_unlock_blocking(eb); |
1379 | free_extent_buffer(eb); | 1380 | free_extent_buffer(eb); |
@@ -1454,7 +1455,8 @@ get_old_root(struct btrfs_root *root, u64 time_seq) | |||
1454 | } else if (old_root) { | 1455 | } else if (old_root) { |
1455 | btrfs_tree_read_unlock(eb_root); | 1456 | btrfs_tree_read_unlock(eb_root); |
1456 | free_extent_buffer(eb_root); | 1457 | free_extent_buffer(eb_root); |
1457 | eb = alloc_dummy_extent_buffer(root->fs_info, logical); | 1458 | eb = alloc_dummy_extent_buffer(root->fs_info, logical, |
1459 | root->nodesize); | ||
1458 | } else { | 1460 | } else { |
1459 | btrfs_set_lock_blocking_rw(eb_root, BTRFS_READ_LOCK); | 1461 | btrfs_set_lock_blocking_rw(eb_root, BTRFS_READ_LOCK); |
1460 | eb = btrfs_clone_extent_buffer(eb_root); | 1462 | eb = btrfs_clone_extent_buffer(eb_root); |
@@ -1552,6 +1554,7 @@ noinline int btrfs_cow_block(struct btrfs_trans_handle *trans, | |||
1552 | trans->transid, root->fs_info->generation); | 1554 | trans->transid, root->fs_info->generation); |
1553 | 1555 | ||
1554 | if (!should_cow_block(trans, root, buf)) { | 1556 | if (!should_cow_block(trans, root, buf)) { |
1557 | trans->dirty = true; | ||
1555 | *cow_ret = buf; | 1558 | *cow_ret = buf; |
1556 | return 0; | 1559 | return 0; |
1557 | } | 1560 | } |
@@ -2510,6 +2513,8 @@ read_block_for_search(struct btrfs_trans_handle *trans, | |||
2510 | if (!btrfs_buffer_uptodate(tmp, 0, 0)) | 2513 | if (!btrfs_buffer_uptodate(tmp, 0, 0)) |
2511 | ret = -EIO; | 2514 | ret = -EIO; |
2512 | free_extent_buffer(tmp); | 2515 | free_extent_buffer(tmp); |
2516 | } else { | ||
2517 | ret = PTR_ERR(tmp); | ||
2513 | } | 2518 | } |
2514 | return ret; | 2519 | return ret; |
2515 | } | 2520 | } |
@@ -2773,8 +2778,10 @@ again: | |||
2773 | * then we don't want to set the path blocking, | 2778 | * then we don't want to set the path blocking, |
2774 | * so we test it here | 2779 | * so we test it here |
2775 | */ | 2780 | */ |
2776 | if (!should_cow_block(trans, root, b)) | 2781 | if (!should_cow_block(trans, root, b)) { |
2782 | trans->dirty = true; | ||
2777 | goto cow_done; | 2783 | goto cow_done; |
2784 | } | ||
2778 | 2785 | ||
2779 | /* | 2786 | /* |
2780 | * must have write locks on this node and the | 2787 | * must have write locks on this node and the |