X-Git-Url: http://git.samba.org/samba.git/?p=sfrench%2Fcifs-2.6.git;a=blobdiff_plain;f=fs%2Fbtrfs%2Fctree.h;fp=fs%2Fbtrfs%2Fctree.h;h=6169d3b284757779de5d808c903818f9e3fe6bc6;hp=428f51efd45537d13891a160fc77c28220ea1731;hb=9b48addac406bd10afe447c2182b241dbde1d1a6;hpb=6bfd0ffa6f2ae0ead92af7c4521626cd456115c5 diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 428f51efd455..6169d3b28475 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -686,39 +686,6 @@ static inline int btrfs_next_item(struct btrfs_root *root, struct btrfs_path *p) } int btrfs_leaf_free_space(struct extent_buffer *leaf); -/* - * Get the correct offset inside the page of extent buffer. - * - * @eb: target extent buffer - * @start: offset inside the extent buffer - * - * Will handle both sectorsize == PAGE_SIZE and sectorsize < PAGE_SIZE cases. - */ -static inline size_t get_eb_offset_in_page(const struct extent_buffer *eb, - unsigned long offset) -{ - /* - * For sectorsize == PAGE_SIZE case, eb->start will always be aligned - * to PAGE_SIZE, thus adding it won't cause any difference. - * - * For sectorsize < PAGE_SIZE, we must only read the data that belongs - * to the eb, thus we have to take the eb->start into consideration. - */ - return offset_in_page(offset + eb->start); -} - -static inline unsigned long get_eb_page_index(unsigned long offset) -{ - /* - * For sectorsize == PAGE_SIZE case, plain >> PAGE_SHIFT is enough. - * - * For sectorsize < PAGE_SIZE case, we only support 64K PAGE_SIZE, - * and have ensured that all tree blocks are contained in one page, - * thus we always get index == 0. - */ - return offset >> PAGE_SHIFT; -} - static inline int is_fstree(u64 rootid) { if (rootid == BTRFS_FS_TREE_OBJECTID ||