path: root/ctree.h
diff options
authorGu Jinxiang <>2018-01-31 11:09:19 +0800
committerDavid Sterba <>2018-02-02 16:01:57 +0100
commit4665484f5f9266a3671c634d664b88fe5b900d56 (patch)
tree5b9697c7be900a4b00235d20a2203e0f6efa683f /ctree.h
parentf1bc62184661120e1a8820b063718aa0f8c9893d (diff)
btrfs-progs: Cleanup use of root in leaf_data_end
In function leaf_data_end, root is just used to get fs_info, so change the parameter of this function from btrfs_root to btrfs_fs_info. And also make it consistent with kernel. Add const to parameter leaf of function btrfs_item_offset_nr to keep type consistent with leaf_data_end. Signed-off-by: Gu Jinxiang <> Reviewed-by: Qu Wenruo <> Signed-off-by: David Sterba <>
Diffstat (limited to 'ctree.h')
1 files changed, 1 insertions, 1 deletions
diff --git a/ctree.h b/ctree.h
index 2b7e071c..17cdac76 100644
--- a/ctree.h
+++ b/ctree.h
@@ -1857,7 +1857,7 @@ static inline u32 btrfs_item_end_nr(struct extent_buffer *eb, int nr)
return btrfs_item_end(eb, btrfs_item_nr(nr));
-static inline u32 btrfs_item_offset_nr(struct extent_buffer *eb, int nr)
+static inline u32 btrfs_item_offset_nr(const struct extent_buffer *eb, int nr)
return btrfs_item_offset(eb, btrfs_item_nr(nr));