Message ID | 14705ec263c747043811d070f32c77a6ab838336.1684967923.git.dsterba@suse.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Parameter cleanups in extent state helpers | expand |
Looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
On 2023/5/25 07:04, David Sterba wrote: > The helper is used only once. > > Signed-off-by: David Sterba <dsterba@suse.com> Reviewed-by: Qu Wenruo <wqu@suse.com> Thanks, Qu > --- > fs/btrfs/defrag.c | 4 +++- > fs/btrfs/extent-io-tree.h | 8 -------- > 2 files changed, 3 insertions(+), 9 deletions(-) > > diff --git a/fs/btrfs/defrag.c b/fs/btrfs/defrag.c > index 8065341d831a..4e7a1e0a0441 100644 > --- a/fs/btrfs/defrag.c > +++ b/fs/btrfs/defrag.c > @@ -1040,7 +1040,9 @@ static int defrag_one_locked_target(struct btrfs_inode *inode, > clear_extent_bit(&inode->io_tree, start, start + len - 1, > EXTENT_DELALLOC | EXTENT_DO_ACCOUNTING | > EXTENT_DEFRAG, cached_state); > - set_extent_defrag(&inode->io_tree, start, start + len - 1, cached_state); > + set_extent_bit(&inode->io_tree, start, start + len - 1, > + EXTENT_DELALLOC | EXTENT_DEFRAG, > + cached_state, GFP_NOFS); > > /* Update the page status */ > for (i = start_index - first_index; i <= last_index - first_index; i++) { > diff --git a/fs/btrfs/extent-io-tree.h b/fs/btrfs/extent-io-tree.h > index 21766e49ec02..ea344e5ca24f 100644 > --- a/fs/btrfs/extent-io-tree.h > +++ b/fs/btrfs/extent-io-tree.h > @@ -202,14 +202,6 @@ static inline int set_extent_delalloc(struct extent_io_tree *tree, u64 start, > cached_state, GFP_NOFS); > } > > -static inline int set_extent_defrag(struct extent_io_tree *tree, u64 start, > - u64 end, struct extent_state **cached_state) > -{ > - return set_extent_bit(tree, start, end, > - EXTENT_DELALLOC | EXTENT_DEFRAG, > - cached_state, GFP_NOFS); > -} > - > static inline int set_extent_new(struct extent_io_tree *tree, u64 start, > u64 end) > {
diff --git a/fs/btrfs/defrag.c b/fs/btrfs/defrag.c index 8065341d831a..4e7a1e0a0441 100644 --- a/fs/btrfs/defrag.c +++ b/fs/btrfs/defrag.c @@ -1040,7 +1040,9 @@ static int defrag_one_locked_target(struct btrfs_inode *inode, clear_extent_bit(&inode->io_tree, start, start + len - 1, EXTENT_DELALLOC | EXTENT_DO_ACCOUNTING | EXTENT_DEFRAG, cached_state); - set_extent_defrag(&inode->io_tree, start, start + len - 1, cached_state); + set_extent_bit(&inode->io_tree, start, start + len - 1, + EXTENT_DELALLOC | EXTENT_DEFRAG, + cached_state, GFP_NOFS); /* Update the page status */ for (i = start_index - first_index; i <= last_index - first_index; i++) { diff --git a/fs/btrfs/extent-io-tree.h b/fs/btrfs/extent-io-tree.h index 21766e49ec02..ea344e5ca24f 100644 --- a/fs/btrfs/extent-io-tree.h +++ b/fs/btrfs/extent-io-tree.h @@ -202,14 +202,6 @@ static inline int set_extent_delalloc(struct extent_io_tree *tree, u64 start, cached_state, GFP_NOFS); } -static inline int set_extent_defrag(struct extent_io_tree *tree, u64 start, - u64 end, struct extent_state **cached_state) -{ - return set_extent_bit(tree, start, end, - EXTENT_DELALLOC | EXTENT_DEFRAG, - cached_state, GFP_NOFS); -} - static inline int set_extent_new(struct extent_io_tree *tree, u64 start, u64 end) {
The helper is used only once. Signed-off-by: David Sterba <dsterba@suse.com> --- fs/btrfs/defrag.c | 4 +++- fs/btrfs/extent-io-tree.h | 8 -------- 2 files changed, 3 insertions(+), 9 deletions(-)