mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] xfs: Remove unused function is_rt_data_fork
@ 2024-03-04  2:24 Jiapeng Chong
  2024-03-04  2:44 ` Darrick J. Wong
  0 siblings, 1 reply; 2+ messages in thread
From: Jiapeng Chong @ 2024-03-04  2:24 UTC (permalink / raw)
  To: chandan.babu; +Cc: djwong, linux-xfs, linux-kernel, Jiapeng Chong, Abaci Robot

The function are defined in the rmap_repair.c file, but not called
elsewhere, so delete the unused function.

fs/xfs/scrub/rmap_repair.c:436:1: warning: unused function 'is_rt_data_fork'.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=8425
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
 fs/xfs/scrub/rmap_repair.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/fs/xfs/scrub/rmap_repair.c b/fs/xfs/scrub/rmap_repair.c
index e8e07b683eab..7e73ddfb3d44 100644
--- a/fs/xfs/scrub/rmap_repair.c
+++ b/fs/xfs/scrub/rmap_repair.c
@@ -432,14 +432,6 @@ xrep_rmap_scan_iroot_btree(
 	return error;
 }
 
-static inline bool
-is_rt_data_fork(
-	struct xfs_inode	*ip,
-	int			whichfork)
-{
-	return XFS_IS_REALTIME_INODE(ip) && whichfork == XFS_DATA_FORK;
-}
-
 /*
  * Iterate the block mapping btree to collect rmap records for anything in this
  * fork that matches the AG.  Sets @mappings_done to true if we've scanned the
-- 
2.20.1.7.g153144c


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] xfs: Remove unused function is_rt_data_fork
  2024-03-04  2:24 [PATCH] xfs: Remove unused function is_rt_data_fork Jiapeng Chong
@ 2024-03-04  2:44 ` Darrick J. Wong
  0 siblings, 0 replies; 2+ messages in thread
From: Darrick J. Wong @ 2024-03-04  2:44 UTC (permalink / raw)
  To: Jiapeng Chong; +Cc: chandan.babu, linux-xfs, linux-kernel, Abaci Robot

On Mon, Mar 04, 2024 at 10:24:08AM +0800, Jiapeng Chong wrote:
> The function are defined in the rmap_repair.c file, but not called
> elsewhere, so delete the unused function.
> 
> fs/xfs/scrub/rmap_repair.c:436:1: warning: unused function 'is_rt_data_fork'.
> 
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=8425
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>

Oh hey, that really /is/ unused, even in djwong-wtf.  Good catch!

Reviewed-by: Darrick J. Wong <djwong@kernel.org>

--D

> ---
>  fs/xfs/scrub/rmap_repair.c | 8 --------
>  1 file changed, 8 deletions(-)
> 
> diff --git a/fs/xfs/scrub/rmap_repair.c b/fs/xfs/scrub/rmap_repair.c
> index e8e07b683eab..7e73ddfb3d44 100644
> --- a/fs/xfs/scrub/rmap_repair.c
> +++ b/fs/xfs/scrub/rmap_repair.c
> @@ -432,14 +432,6 @@ xrep_rmap_scan_iroot_btree(
>  	return error;
>  }
>  
> -static inline bool
> -is_rt_data_fork(
> -	struct xfs_inode	*ip,
> -	int			whichfork)
> -{
> -	return XFS_IS_REALTIME_INODE(ip) && whichfork == XFS_DATA_FORK;
> -}
> -
>  /*
>   * Iterate the block mapping btree to collect rmap records for anything in this
>   * fork that matches the AG.  Sets @mappings_done to true if we've scanned the
> -- 
> 2.20.1.7.g153144c
> 
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-03-04  2:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-04  2:24 [PATCH] xfs: Remove unused function is_rt_data_fork Jiapeng Chong
2024-03-04  2:44 ` Darrick J. Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®