summaryrefslogtreecommitdiff
path: root/fs/btrfs/ctree.c
diff options
context:
space:
mode:
authorChris Mason <clm@fb.com>2014-10-04 20:56:45 +0400
committerChris Mason <clm@fb.com>2014-10-04 20:56:45 +0400
commitbbf65cf0b5b67843ca094df01019222b85af2183 (patch)
tree35e1a8c54876cc8a105a2ad0230526195d3cafbf /fs/btrfs/ctree.c
parentbf8e8ca6fd4ac6e8edc58b92cffb2ffd51933138 (diff)
parentfccb84c94a9755f48668e43d0a44d6ecc750900f (diff)
downloadlinux-bbf65cf0b5b67843ca094df01019222b85af2183.tar.xz
Merge branch 'cleanup/misc-for-3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux into for-linus
Signed-off-by: Chris Mason <clm@fb.com> Conflicts: fs/btrfs/extent_io.c
Diffstat (limited to 'fs/btrfs/ctree.c')
-rw-r--r--fs/btrfs/ctree.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
index 8d0703cc7402..b289d2a9bbf5 100644
--- a/fs/btrfs/ctree.c
+++ b/fs/btrfs/ctree.c
@@ -1506,10 +1506,9 @@ static inline int should_cow_block(struct btrfs_trans_handle *trans,
struct btrfs_root *root,
struct extent_buffer *buf)
{
-#ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS
- if (unlikely(test_bit(BTRFS_ROOT_DUMMY_ROOT, &root->state)))
+ if (btrfs_test_is_dummy_root(root))
return 0;
-#endif
+
/* ensure we can see the force_cow */
smp_rmb();
@@ -4625,8 +4624,7 @@ void btrfs_truncate_item(struct btrfs_root *root, struct btrfs_path *path,
ptr = btrfs_item_ptr_offset(leaf, slot);
memmove_extent_buffer(leaf, ptr,
(unsigned long)fi,
- offsetof(struct btrfs_file_extent_item,
- disk_bytenr));
+ BTRFS_FILE_EXTENT_INLINE_DATA_START);
}
}