@@ -3280,8 +3280,11 @@ struct inode *btrfs_iget(struct super_block *s, struct btrfs_key *location,
int btrfs_get_extent_map_write(struct extent_map **map, struct buffer_head *bh,
struct inode *inode, u64 start, u64 len, int *nocow);
struct extent_map *btrfs_get_extent(struct btrfs_inode *inode,
- struct page *page, size_t pg_offset,
- u64 start, u64 end, int create);
+ struct page *page, size_t pg_offset,
+ u64 start, u64 end, int create);
+void btrfs_update_ordered_extent(struct inode *inode,
+ const u64 offset, const u64 bytes,
+ const bool uptodate);
int btrfs_update_inode(struct btrfs_trans_handle *trans,
struct btrfs_root *root,
struct inode *inode);
@@ -98,10 +98,6 @@ static struct extent_map *create_io_em(struct inode *inode, u64 start, u64 len,
u64 ram_bytes, int compress_type,
int type);
-static void __endio_write_update_ordered(struct inode *inode,
- const u64 offset, const u64 bytes,
- const bool uptodate);
-
/*
* Cleanup all submitted ordered extents in specified range to handle errors
* from the btrfs_run_delalloc_range() callback.
@@ -142,7 +138,7 @@ static inline void btrfs_cleanup_ordered_extents(struct inode *inode,
bytes -= PAGE_SIZE;
}
- return __endio_write_update_ordered(inode, offset, bytes, false);
+ return btrfs_update_ordered_extent(inode, offset, bytes, false);
}
static int btrfs_dirty_inode(struct inode *inode);
@@ -8085,7 +8081,7 @@ static void btrfs_endio_direct_read(struct bio *bio)
bio_put(bio);
}
-static void __endio_write_update_ordered(struct inode *inode,
+void btrfs_update_ordered_extent(struct inode *inode,
const u64 offset, const u64 bytes,
const bool uptodate)
{
@@ -8138,7 +8134,7 @@ static void btrfs_endio_direct_write(struct bio *bio)
struct btrfs_dio_private *dip = bio->bi_private;
struct bio *dio_bio = dip->dio_bio;
- __endio_write_update_ordered(dip->inode, dip->logical_offset,
+ btrfs_update_ordered_extent(dip->inode, dip->logical_offset,
dip->bytes, !bio->bi_status);
kfree(dip);
@@ -8457,7 +8453,7 @@ static void btrfs_submit_direct(struct bio *dio_bio, struct inode *inode,
bio = NULL;
} else {
if (write)
- __endio_write_update_ordered(inode,
+ btrfs_update_ordered_extent(inode,
file_offset,
dio_bio->bi_iter.bi_size,
false);
@@ -8597,7 +8593,7 @@ static ssize_t btrfs_direct_IO(struct kiocb *iocb, struct iov_iter *iter)
*/
if (dio_data.unsubmitted_oe_range_start <
dio_data.unsubmitted_oe_range_end)
- __endio_write_update_ordered(inode,
+ btrfs_update_ordered_extent(inode,
dio_data.unsubmitted_oe_range_start,
dio_data.unsubmitted_oe_range_end -
dio_data.unsubmitted_oe_range_start,