diff mbox series

[5/5] xfs: remove the flags argument to xfs_buf_get_uncached

Message ID 20250317054850.1132557-6-hch@lst.de (mailing list archive)
State New
Headers show
Series [1/5] xfs: call xfs_buf_alloc_backing_mem from _xfs_buf_alloc | expand

Commit Message

hch March 17, 2025, 5:48 a.m. UTC
No callers passes flags to xfs_buf_get_uncached, which makes sense
given that the flags apply to behavior not used for uncached buffers.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 fs/xfs/libxfs/xfs_ag.c | 2 +-
 fs/xfs/xfs_buf.c       | 5 ++---
 fs/xfs/xfs_buf.h       | 2 +-
 fs/xfs/xfs_rtalloc.c   | 2 +-
 4 files changed, 5 insertions(+), 6 deletions(-)

Comments

Carlos Maiolino March 18, 2025, 12:54 p.m. UTC | #1
On Mon, Mar 17, 2025 at 06:48:36AM +0100, Christoph Hellwig wrote:
> No callers passes flags to xfs_buf_get_uncached, which makes sense
> given that the flags apply to behavior not used for uncached buffers.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>

Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>

> ---
>  fs/xfs/libxfs/xfs_ag.c | 2 +-
>  fs/xfs/xfs_buf.c       | 5 ++---
>  fs/xfs/xfs_buf.h       | 2 +-
>  fs/xfs/xfs_rtalloc.c   | 2 +-
>  4 files changed, 5 insertions(+), 6 deletions(-)
> 
> diff --git a/fs/xfs/libxfs/xfs_ag.c b/fs/xfs/libxfs/xfs_ag.c
> index b59cb461e096..e6ba914f6d06 100644
> --- a/fs/xfs/libxfs/xfs_ag.c
> +++ b/fs/xfs/libxfs/xfs_ag.c
> @@ -301,7 +301,7 @@ xfs_get_aghdr_buf(
>  	struct xfs_buf		*bp;
>  	int			error;
> 
> -	error = xfs_buf_get_uncached(mp->m_ddev_targp, numblks, 0, &bp);
> +	error = xfs_buf_get_uncached(mp->m_ddev_targp, numblks, &bp);
>  	if (error)
>  		return error;
> 
> diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c
> index 6469a69b18fe..8e7f1b324b3b 100644
> --- a/fs/xfs/xfs_buf.c
> +++ b/fs/xfs/xfs_buf.c
> @@ -810,7 +810,7 @@ xfs_buf_read_uncached(
> 
>  	*bpp = NULL;
> 
> -	error = xfs_buf_get_uncached(target, numblks, 0, &bp);
> +	error = xfs_buf_get_uncached(target, numblks, &bp);
>  	if (error)
>  		return error;
> 
> @@ -836,13 +836,12 @@ int
>  xfs_buf_get_uncached(
>  	struct xfs_buftarg	*target,
>  	size_t			numblks,
> -	xfs_buf_flags_t		flags,
>  	struct xfs_buf		**bpp)
>  {
>  	int			error;
>  	DEFINE_SINGLE_BUF_MAP(map, XFS_BUF_DADDR_NULL, numblks);
> 
> -	error = xfs_buf_alloc(target, &map, 1, flags, bpp);
> +	error = xfs_buf_alloc(target, &map, 1, 0, bpp);
>  	if (!error)
>  		trace_xfs_buf_get_uncached(*bpp, _RET_IP_);
>  	return error;
> diff --git a/fs/xfs/xfs_buf.h b/fs/xfs/xfs_buf.h
> index 6a426a8d6197..d0b065a9a9f0 100644
> --- a/fs/xfs/xfs_buf.h
> +++ b/fs/xfs/xfs_buf.h
> @@ -273,7 +273,7 @@ xfs_buf_readahead(
>  }
> 
>  int xfs_buf_get_uncached(struct xfs_buftarg *target, size_t numblks,
> -		xfs_buf_flags_t flags, struct xfs_buf **bpp);
> +		struct xfs_buf **bpp);
>  int xfs_buf_read_uncached(struct xfs_buftarg *target, xfs_daddr_t daddr,
>  		size_t numblks, struct xfs_buf **bpp,
>  		const struct xfs_buf_ops *ops);
> diff --git a/fs/xfs/xfs_rtalloc.c b/fs/xfs/xfs_rtalloc.c
> index e35c728f222e..6484c596ecea 100644
> --- a/fs/xfs/xfs_rtalloc.c
> +++ b/fs/xfs/xfs_rtalloc.c
> @@ -839,7 +839,7 @@ xfs_growfs_rt_init_rtsb(
>  		return 0;
> 
>  	error = xfs_buf_get_uncached(mp->m_rtdev_targp, XFS_FSB_TO_BB(mp, 1),
> -			0, &rtsb_bp);
> +			&rtsb_bp);
>  	if (error)
>  		return error;
> 
> --
> 2.45.2
> 
>
diff mbox series

Patch

diff --git a/fs/xfs/libxfs/xfs_ag.c b/fs/xfs/libxfs/xfs_ag.c
index b59cb461e096..e6ba914f6d06 100644
--- a/fs/xfs/libxfs/xfs_ag.c
+++ b/fs/xfs/libxfs/xfs_ag.c
@@ -301,7 +301,7 @@  xfs_get_aghdr_buf(
 	struct xfs_buf		*bp;
 	int			error;
 
-	error = xfs_buf_get_uncached(mp->m_ddev_targp, numblks, 0, &bp);
+	error = xfs_buf_get_uncached(mp->m_ddev_targp, numblks, &bp);
 	if (error)
 		return error;
 
diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c
index 6469a69b18fe..8e7f1b324b3b 100644
--- a/fs/xfs/xfs_buf.c
+++ b/fs/xfs/xfs_buf.c
@@ -810,7 +810,7 @@  xfs_buf_read_uncached(
 
 	*bpp = NULL;
 
-	error = xfs_buf_get_uncached(target, numblks, 0, &bp);
+	error = xfs_buf_get_uncached(target, numblks, &bp);
 	if (error)
 		return error;
 
@@ -836,13 +836,12 @@  int
 xfs_buf_get_uncached(
 	struct xfs_buftarg	*target,
 	size_t			numblks,
-	xfs_buf_flags_t		flags,
 	struct xfs_buf		**bpp)
 {
 	int			error;
 	DEFINE_SINGLE_BUF_MAP(map, XFS_BUF_DADDR_NULL, numblks);
 
-	error = xfs_buf_alloc(target, &map, 1, flags, bpp);
+	error = xfs_buf_alloc(target, &map, 1, 0, bpp);
 	if (!error)
 		trace_xfs_buf_get_uncached(*bpp, _RET_IP_);
 	return error;
diff --git a/fs/xfs/xfs_buf.h b/fs/xfs/xfs_buf.h
index 6a426a8d6197..d0b065a9a9f0 100644
--- a/fs/xfs/xfs_buf.h
+++ b/fs/xfs/xfs_buf.h
@@ -273,7 +273,7 @@  xfs_buf_readahead(
 }
 
 int xfs_buf_get_uncached(struct xfs_buftarg *target, size_t numblks,
-		xfs_buf_flags_t flags, struct xfs_buf **bpp);
+		struct xfs_buf **bpp);
 int xfs_buf_read_uncached(struct xfs_buftarg *target, xfs_daddr_t daddr,
 		size_t numblks, struct xfs_buf **bpp,
 		const struct xfs_buf_ops *ops);
diff --git a/fs/xfs/xfs_rtalloc.c b/fs/xfs/xfs_rtalloc.c
index e35c728f222e..6484c596ecea 100644
--- a/fs/xfs/xfs_rtalloc.c
+++ b/fs/xfs/xfs_rtalloc.c
@@ -839,7 +839,7 @@  xfs_growfs_rt_init_rtsb(
 		return 0;
 
 	error = xfs_buf_get_uncached(mp->m_rtdev_targp, XFS_FSB_TO_BB(mp, 1),
-			0, &rtsb_bp);
+			&rtsb_bp);
 	if (error)
 		return error;