2022-07-14 09:44:36

by Xiu Jianfeng

[permalink] [raw]
Subject: [PATCH -next] writeback: Cleanup inode_to_wb_is_valid()

inode_to_wb_is_valid() is no longer used since commit fe55d563d417
("remove inode_congested()"), remove it.

Signed-off-by: Xiu Jianfeng <[email protected]>
---
include/linux/backing-dev.h | 17 -----------------
1 file changed, 17 deletions(-)

diff --git a/include/linux/backing-dev.h b/include/linux/backing-dev.h
index d452071db572..f9f14e385582 100644
--- a/include/linux/backing-dev.h
+++ b/include/linux/backing-dev.h
@@ -235,18 +235,6 @@ wb_get_create_current(struct backing_dev_info *bdi, gfp_t gfp)
return wb;
}

-/**
- * inode_to_wb_is_valid - test whether an inode has a wb associated
- * @inode: inode of interest
- *
- * Returns %true if @inode has a wb associated. May be called without any
- * locking.
- */
-static inline bool inode_to_wb_is_valid(struct inode *inode)
-{
- return inode->i_wb;
-}
-
/**
* inode_to_wb - determine the wb of an inode
* @inode: inode of interest
@@ -345,11 +333,6 @@ wb_get_create_current(struct backing_dev_info *bdi, gfp_t gfp)
return &bdi->wb;
}

-static inline bool inode_to_wb_is_valid(struct inode *inode)
-{
- return true;
-}
-
static inline struct bdi_writeback *inode_to_wb(struct inode *inode)
{
return &inode_to_bdi(inode)->wb;
--
2.17.1


2022-07-14 09:46:20

by Johannes Thumshirn

[permalink] [raw]
Subject: Re: [PATCH -next] writeback: Cleanup inode_to_wb_is_valid()

Looks good,
Reviewed-by: Johannes Thumshirn <[email protected]>

2022-07-14 10:35:09

by Jan Kara

[permalink] [raw]
Subject: Re: [PATCH -next] writeback: Cleanup inode_to_wb_is_valid()

On Thu 14-07-22 16:41:47, Xiu Jianfeng wrote:
> inode_to_wb_is_valid() is no longer used since commit fe55d563d417
> ("remove inode_congested()"), remove it.
>
> Signed-off-by: Xiu Jianfeng <[email protected]>

Looks good! Feel free to add:

Reviewed-by: Jan Kara <[email protected]>

Honza

> ---
> include/linux/backing-dev.h | 17 -----------------
> 1 file changed, 17 deletions(-)
>
> diff --git a/include/linux/backing-dev.h b/include/linux/backing-dev.h
> index d452071db572..f9f14e385582 100644
> --- a/include/linux/backing-dev.h
> +++ b/include/linux/backing-dev.h
> @@ -235,18 +235,6 @@ wb_get_create_current(struct backing_dev_info *bdi, gfp_t gfp)
> return wb;
> }
>
> -/**
> - * inode_to_wb_is_valid - test whether an inode has a wb associated
> - * @inode: inode of interest
> - *
> - * Returns %true if @inode has a wb associated. May be called without any
> - * locking.
> - */
> -static inline bool inode_to_wb_is_valid(struct inode *inode)
> -{
> - return inode->i_wb;
> -}
> -
> /**
> * inode_to_wb - determine the wb of an inode
> * @inode: inode of interest
> @@ -345,11 +333,6 @@ wb_get_create_current(struct backing_dev_info *bdi, gfp_t gfp)
> return &bdi->wb;
> }
>
> -static inline bool inode_to_wb_is_valid(struct inode *inode)
> -{
> - return true;
> -}
> -
> static inline struct bdi_writeback *inode_to_wb(struct inode *inode)
> {
> return &inode_to_bdi(inode)->wb;
> --
> 2.17.1
>
--
Jan Kara <[email protected]>
SUSE Labs, CR