summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/extent_io.c
diff options
context:
space:
mode:
authorFilipe Manana2014-02-25 15:15:12 +0100
committerJosef Bacik2014-03-10 20:16:56 +0100
commitcbc0e9287d710ce7dce5f8daf667729e83316c45 (patch)
treeabd3c0c847c07464186b86afb9cea66473f024ed /fs/btrfs/extent_io.c
parentBtrfs: skip locking when searching commit root (diff)
downloadkernel-qcow2-linux-cbc0e9287d710ce7dce5f8daf667729e83316c45.tar.gz
kernel-qcow2-linux-cbc0e9287d710ce7dce5f8daf667729e83316c45.tar.xz
kernel-qcow2-linux-cbc0e9287d710ce7dce5f8daf667729e83316c45.zip
Btrfs: remove unneeded field / smaller extent_map structure
We don't need to have an unsigned int field in the extent_map struct to tell us whether the extent map is in the inode's extent_map tree or not. We can use the rb_node struct field and the RB_CLEAR_NODE and RB_EMPTY_NODE macros to achieve the same task. This reduces sizeof(struct extent_map) from 152 bytes to 144 bytes (on a 64 bits system). Signed-off-by: Filipe David Borba Manana <fdmanana@gmail.com> Reviewed-by: David Sterba <dsterba@suse.cz> Signed-off-by: Josef Bacik <jbacik@fb.com>
Diffstat (limited to 'fs/btrfs/extent_io.c')
-rw-r--r--fs/btrfs/extent_io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index fbe501d3bd01..2c9fbe3b6eec 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -2763,7 +2763,7 @@ __get_extent_map(struct inode *inode, struct page *page, size_t pg_offset,
if (em_cached && *em_cached) {
em = *em_cached;
- if (em->in_tree && start >= em->start &&
+ if (extent_map_in_tree(em) && start >= em->start &&
start < extent_map_end(em)) {
atomic_inc(&em->refs);
return em;