diff --git a/extent_io.c b/extent_io.c index 66aa2149..5d49710d 100644 --- a/extent_io.c +++ b/extent_io.c @@ -827,29 +827,6 @@ int write_data_to_disk(struct btrfs_fs_info *info, void *buf, u64 offset, return 0; } - -int set_extent_buffer_uptodate(struct extent_buffer *eb) -{ - eb->flags |= EXTENT_UPTODATE; - return 0; -} - -int clear_extent_buffer_uptodate(struct extent_io_tree *tree, - struct extent_buffer *eb) -{ - eb->flags &= ~EXTENT_UPTODATE; - return 0; -} - -int extent_buffer_uptodate(struct extent_buffer *eb) -{ - if (!eb || IS_ERR(eb)) - return 0; - if (eb->flags & EXTENT_UPTODATE) - return 1; - return 0; -} - int set_extent_buffer_dirty(struct extent_buffer *eb) { struct extent_io_tree *tree = eb->tree; diff --git a/extent_io.h b/extent_io.h index 3ded4938..27c4b693 100644 --- a/extent_io.h +++ b/extent_io.h @@ -100,10 +100,28 @@ int set_extent_dirty(struct extent_io_tree *tree, u64 start, u64 end, gfp_t mask); int clear_extent_dirty(struct extent_io_tree *tree, u64 start, u64 end, gfp_t mask); -int extent_buffer_uptodate(struct extent_buffer *eb); -int set_extent_buffer_uptodate(struct extent_buffer *eb); -int clear_extent_buffer_uptodate(struct extent_io_tree *tree, - struct extent_buffer *eb); +static inline int set_extent_buffer_uptodate(struct extent_buffer *eb) +{ + eb->flags |= EXTENT_UPTODATE; + return 0; +} + +static inline int clear_extent_buffer_uptodate(struct extent_io_tree *tree, + struct extent_buffer *eb) +{ + eb->flags &= ~EXTENT_UPTODATE; + return 0; +} + +static inline int extent_buffer_uptodate(struct extent_buffer *eb) +{ + if (!eb || IS_ERR(eb)) + return 0; + if (eb->flags & EXTENT_UPTODATE) + return 1; + return 0; +} + int set_state_private(struct extent_io_tree *tree, u64 start, u64 xprivate); int get_state_private(struct extent_io_tree *tree, u64 start, u64 *xprivate); struct extent_buffer *find_extent_buffer(struct extent_io_tree *tree,