diff mbox series

btrfs: Remove unused page_to_{inode,fs_info} macros

Message ID 20240924023135.3861974-1-youling.tang@linux.dev (mailing list archive)
State New, archived
Headers show
Series btrfs: Remove unused page_to_{inode,fs_info} macros | expand

Commit Message

Youling Tang Sept. 24, 2024, 2:31 a.m. UTC
From: Youling Tang <tangyouling@kylinos.cn>

This macro is no longer used after the "btrfs: Cleaned up folio->page
conversion" series patch [1] was applied, so remove it.

[1]: https://patchwork.kernel.org/project/linux-btrfs/cover/20240828182908.3735344-1-lizetao1@huawei.com/

Signed-off-by: Youling Tang <tangyouling@kylinos.cn>
---
 fs/btrfs/fs.h | 3 ---
 1 file changed, 3 deletions(-)

Comments

Neal Gompa Sept. 24, 2024, 3:55 a.m. UTC | #1
On Mon, Sep 23, 2024 at 10:32 PM Youling Tang <youling.tang@linux.dev> wrote:
>
> From: Youling Tang <tangyouling@kylinos.cn>
>
> This macro is no longer used after the "btrfs: Cleaned up folio->page
> conversion" series patch [1] was applied, so remove it.
>
> [1]: https://patchwork.kernel.org/project/linux-btrfs/cover/20240828182908.3735344-1-lizetao1@huawei.com/
>
> Signed-off-by: Youling Tang <tangyouling@kylinos.cn>
> ---
>  fs/btrfs/fs.h | 3 ---
>  1 file changed, 3 deletions(-)
>
> diff --git a/fs/btrfs/fs.h b/fs/btrfs/fs.h
> index 79f64e383edd..82169cbd99e1 100644
> --- a/fs/btrfs/fs.h
> +++ b/fs/btrfs/fs.h
> @@ -876,12 +876,9 @@ struct btrfs_fs_info {
>  #endif
>  };
>
> -#define page_to_inode(_page)   (BTRFS_I(_Generic((_page),                      \
> -                                         struct page *: (_page))->mapping->host))
>  #define folio_to_inode(_folio) (BTRFS_I(_Generic((_folio),                     \
>                                           struct folio *: (_folio))->mapping->host))
>
> -#define page_to_fs_info(_page)  (page_to_inode(_page)->root->fs_info)
>  #define folio_to_fs_info(_folio) (folio_to_inode(_folio)->root->fs_info)
>
>  #define inode_to_fs_info(_inode) (BTRFS_I(_Generic((_inode),                   \
> --
> 2.34.1
>
>

Patch looks good to me.

Reviewed-by: Neal Gompa <neal@gompa.dev>
David Sterba Oct. 1, 2024, 3:46 p.m. UTC | #2
On Tue, Sep 24, 2024 at 10:31:35AM +0800, Youling Tang wrote:
> From: Youling Tang <tangyouling@kylinos.cn>
> 
> This macro is no longer used after the "btrfs: Cleaned up folio->page
> conversion" series patch [1] was applied, so remove it.
> 
> [1]: https://patchwork.kernel.org/project/linux-btrfs/cover/20240828182908.3735344-1-lizetao1@huawei.com/
> 
> Signed-off-by: Youling Tang <tangyouling@kylinos.cn>

Added to for-next thanks.
diff mbox series

Patch

diff --git a/fs/btrfs/fs.h b/fs/btrfs/fs.h
index 79f64e383edd..82169cbd99e1 100644
--- a/fs/btrfs/fs.h
+++ b/fs/btrfs/fs.h
@@ -876,12 +876,9 @@  struct btrfs_fs_info {
 #endif
 };
 
-#define page_to_inode(_page)	(BTRFS_I(_Generic((_page),			\
-					  struct page *: (_page))->mapping->host))
 #define folio_to_inode(_folio)	(BTRFS_I(_Generic((_folio),			\
 					  struct folio *: (_folio))->mapping->host))
 
-#define page_to_fs_info(_page)	 (page_to_inode(_page)->root->fs_info)
 #define folio_to_fs_info(_folio) (folio_to_inode(_folio)->root->fs_info)
 
 #define inode_to_fs_info(_inode) (BTRFS_I(_Generic((_inode),			\