struct extent_state *orig, u64 split);
 void btrfs_set_range_writeback(struct btrfs_inode *inode, u64 start, u64 end);
 vm_fault_t btrfs_page_mkwrite(struct vm_fault *vmf);
-int btrfs_readpage(struct file *file, struct page *page);
 void btrfs_evict_inode(struct inode *inode);
 int btrfs_write_inode(struct inode *inode, struct writeback_control *wbc);
 struct inode *btrfs_alloc_inode(struct super_block *sb);
 
        struct rb_node rb_node;
 };
 
+/*
+ * Structure to record info about the bio being assembled, and other info like
+ * how many bytes are there before stripe/ordered extent boundary.
+ */
+struct btrfs_bio_ctrl {
+       struct bio *bio;
+       unsigned long bio_flags;
+       u32 len_to_stripe_boundary;
+       u32 len_to_oe_boundary;
+};
+
 struct extent_page_data {
        struct btrfs_bio_ctrl bio_ctrl;
        /* tells writepage not to lock the state bits for this range
        return ret;
 }
 
-void submit_one_bio(struct bio *bio, int mirror_num, unsigned long bio_flags)
+static void submit_one_bio(struct bio *bio, int mirror_num, unsigned long bio_flags)
 {
        struct extent_io_tree *tree = bio->bi_private;
 
  * XXX JDM: This needs looking at to ensure proper page locking
  * return 0 on success, otherwise return error
  */
-int btrfs_do_readpage(struct page *page, struct extent_map **em_cached,
+static int btrfs_do_readpage(struct page *page, struct extent_map **em_cached,
                      struct btrfs_bio_ctrl *bio_ctrl,
                      unsigned int read_flags, u64 *prev_em_start)
 {
        return ret;
 }
 
+int btrfs_readpage(struct file *file, struct page *page)
+{
+       struct btrfs_inode *inode = BTRFS_I(page->mapping->host);
+       u64 start = page_offset(page);
+       u64 end = start + PAGE_SIZE - 1;
+       struct btrfs_bio_ctrl bio_ctrl = { 0 };
+       int ret;
+
+       btrfs_lock_and_flush_ordered_range(inode, start, end, NULL);
+
+       ret = btrfs_do_readpage(page, NULL, &bio_ctrl, 0, NULL);
+       /*
+        * If btrfs_do_readpage() failed we will want to submit the assembled
+        * bio to do the cleanup.
+        */
+       if (bio_ctrl.bio)
+               submit_one_bio(bio_ctrl.bio, 0, bio_ctrl.bio_flags);
+       return ret;
+}
+
 static inline void contiguous_readpages(struct page *pages[], int nr_pages,
                                        u64 start, u64 end,
                                        struct extent_map **em_cached,
 
 #endif
 };
 
-/*
- * Structure to record info about the bio being assembled, and other info like
- * how many bytes are there before stripe/ordered extent boundary.
- */
-struct btrfs_bio_ctrl {
-       struct bio *bio;
-       unsigned long bio_flags;
-       u32 len_to_stripe_boundary;
-       u32 len_to_oe_boundary;
-};
-
 /*
  * Structure to record how many bytes and which ranges are set/cleared
  */
 int try_release_extent_mapping(struct page *page, gfp_t mask);
 int try_release_extent_buffer(struct page *page);
 
-void submit_one_bio(struct bio *bio, int mirror_num, unsigned long bio_flags);
-int btrfs_do_readpage(struct page *page, struct extent_map **em_cached,
-                     struct btrfs_bio_ctrl *bio_ctrl,
-                     unsigned int read_flags, u64 *prev_em_start);
+int btrfs_readpage(struct file *file, struct page *page);
 int extent_write_full_page(struct page *page, struct writeback_control *wbc);
 int extent_write_locked_range(struct inode *inode, u64 start, u64 end);
 int extent_writepages(struct address_space *mapping,
 
        return extent_fiemap(BTRFS_I(inode), fieinfo, start, len);
 }
 
-int btrfs_readpage(struct file *file, struct page *page)
-{
-       struct btrfs_inode *inode = BTRFS_I(page->mapping->host);
-       u64 start = page_offset(page);
-       u64 end = start + PAGE_SIZE - 1;
-       struct btrfs_bio_ctrl bio_ctrl = { 0 };
-       int ret;
-
-       btrfs_lock_and_flush_ordered_range(inode, start, end, NULL);
-
-       ret = btrfs_do_readpage(page, NULL, &bio_ctrl, 0, NULL);
-       /*
-        * If btrfs_do_readpage() failed we will want to submit the assembled
-        * bio to do the cleanup.
-        */
-       if (bio_ctrl.bio)
-               submit_one_bio(bio_ctrl.bio, 0, bio_ctrl.bio_flags);
-       return ret;
-}
-
 static int btrfs_writepage(struct page *page, struct writeback_control *wbc)
 {
        struct inode *inode = page->mapping->host;