xfs: remove unused flags arg from xfs_get_aghdr_buf()
diff mbox series

Message ID 2f4d86a1-0cb9-f859-b120-34d1b511942f@redhat.com
State Accepted
Headers show
Series
  • xfs: remove unused flags arg from xfs_get_aghdr_buf()
Related show

Commit Message

Eric Sandeen Sept. 27, 2019, 3:46 p.m. UTC
The flags op is always passed as zero, so remove it.

(xfs_buf_get_uncached takes flags to support XBF_NO_IOACCT for
the sb, but that should never be relevant for xfs_get_aghdr_buf)

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---

Comments

Eric Sandeen Sept. 27, 2019, 3:50 p.m. UTC | #1
On 9/27/19 10:46 AM, Eric Sandeen wrote:
> The flags op is always passed as zero, so remove it.

Argh.  "arg"

-Eric
 
> (xfs_buf_get_uncached takes flags to support XBF_NO_IOACCT for
> the sb, but that should never be relevant for xfs_get_aghdr_buf)
> 
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
> ---
> 
> diff --git a/fs/xfs/libxfs/xfs_ag.c b/fs/xfs/libxfs/xfs_ag.c
> index 5de296b34ab1..14fbdf22b7e7 100644
> --- a/fs/xfs/libxfs/xfs_ag.c
> +++ b/fs/xfs/libxfs/xfs_ag.c
> @@ -28,12 +28,11 @@ xfs_get_aghdr_buf(
>  	struct xfs_mount	*mp,
>  	xfs_daddr_t		blkno,
>  	size_t			numblks,
> -	int			flags,
>  	const struct xfs_buf_ops *ops)
>  {
>  	struct xfs_buf		*bp;
>  
> -	bp = xfs_buf_get_uncached(mp->m_ddev_targp, numblks, flags);
> +	bp = xfs_buf_get_uncached(mp->m_ddev_targp, numblks, 0);
>  	if (!bp)
>  		return NULL;
>  
> @@ -345,7 +344,7 @@ xfs_ag_init_hdr(
>  {
>  	struct xfs_buf		*bp;
>  
> -	bp = xfs_get_aghdr_buf(mp, id->daddr, id->numblks, 0, ops);
> +	bp = xfs_get_aghdr_buf(mp, id->daddr, id->numblks, ops);
>  	if (!bp)
>  		return -ENOMEM;
>  
>
Carlos Maiolino Sept. 30, 2019, 7:38 a.m. UTC | #2
On Fri, Sep 27, 2019 at 10:46:42AM -0500, Eric Sandeen wrote:
> The flags op is always passed as zero, so remove it.

Fixing the  op -> arg:

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


> 
> (xfs_buf_get_uncached takes flags to support XBF_NO_IOACCT for
> the sb, but that should never be relevant for xfs_get_aghdr_buf)

> 
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
> ---
> 
> diff --git a/fs/xfs/libxfs/xfs_ag.c b/fs/xfs/libxfs/xfs_ag.c
> index 5de296b34ab1..14fbdf22b7e7 100644
> --- a/fs/xfs/libxfs/xfs_ag.c
> +++ b/fs/xfs/libxfs/xfs_ag.c
> @@ -28,12 +28,11 @@ xfs_get_aghdr_buf(
>  	struct xfs_mount	*mp,
>  	xfs_daddr_t		blkno,
>  	size_t			numblks,
> -	int			flags,
>  	const struct xfs_buf_ops *ops)
>  {
>  	struct xfs_buf		*bp;
>  
> -	bp = xfs_buf_get_uncached(mp->m_ddev_targp, numblks, flags);
> +	bp = xfs_buf_get_uncached(mp->m_ddev_targp, numblks, 0);
>  	if (!bp)
>  		return NULL;
>  
> @@ -345,7 +344,7 @@ xfs_ag_init_hdr(
>  {
>  	struct xfs_buf		*bp;
>  
> -	bp = xfs_get_aghdr_buf(mp, id->daddr, id->numblks, 0, ops);
> +	bp = xfs_get_aghdr_buf(mp, id->daddr, id->numblks, ops);
>  	if (!bp)
>  		return -ENOMEM;
>  
>
Christoph Hellwig Sept. 30, 2019, 7:42 a.m. UTC | #3
On Fri, Sep 27, 2019 at 10:46:42AM -0500, Eric Sandeen wrote:
> The flags op is always passed as zero, so remove it.
> 
> (xfs_buf_get_uncached takes flags to support XBF_NO_IOACCT for
> the sb, but that should never be relevant for xfs_get_aghdr_buf)
> 
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>

Looks good,

Reviewed-by: Christoph Hellwig <hch@lst.de>
Darrick J. Wong Sept. 30, 2019, 6:24 p.m. UTC | #4
On Fri, Sep 27, 2019 at 10:46:42AM -0500, Eric Sandeen wrote:
> The flags op is always passed as zero, so remove it.
> 
> (xfs_buf_get_uncached takes flags to support XBF_NO_IOACCT for
> the sb, but that should never be relevant for xfs_get_aghdr_buf)
> 
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>

Looks ok,
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>

--D

> ---
> 
> diff --git a/fs/xfs/libxfs/xfs_ag.c b/fs/xfs/libxfs/xfs_ag.c
> index 5de296b34ab1..14fbdf22b7e7 100644
> --- a/fs/xfs/libxfs/xfs_ag.c
> +++ b/fs/xfs/libxfs/xfs_ag.c
> @@ -28,12 +28,11 @@ xfs_get_aghdr_buf(
>  	struct xfs_mount	*mp,
>  	xfs_daddr_t		blkno,
>  	size_t			numblks,
> -	int			flags,
>  	const struct xfs_buf_ops *ops)
>  {
>  	struct xfs_buf		*bp;
>  
> -	bp = xfs_buf_get_uncached(mp->m_ddev_targp, numblks, flags);
> +	bp = xfs_buf_get_uncached(mp->m_ddev_targp, numblks, 0);
>  	if (!bp)
>  		return NULL;
>  
> @@ -345,7 +344,7 @@ xfs_ag_init_hdr(
>  {
>  	struct xfs_buf		*bp;
>  
> -	bp = xfs_get_aghdr_buf(mp, id->daddr, id->numblks, 0, ops);
> +	bp = xfs_get_aghdr_buf(mp, id->daddr, id->numblks, ops);
>  	if (!bp)
>  		return -ENOMEM;
>  
>

Patch
diff mbox series

diff --git a/fs/xfs/libxfs/xfs_ag.c b/fs/xfs/libxfs/xfs_ag.c
index 5de296b34ab1..14fbdf22b7e7 100644
--- a/fs/xfs/libxfs/xfs_ag.c
+++ b/fs/xfs/libxfs/xfs_ag.c
@@ -28,12 +28,11 @@  xfs_get_aghdr_buf(
 	struct xfs_mount	*mp,
 	xfs_daddr_t		blkno,
 	size_t			numblks,
-	int			flags,
 	const struct xfs_buf_ops *ops)
 {
 	struct xfs_buf		*bp;
 
-	bp = xfs_buf_get_uncached(mp->m_ddev_targp, numblks, flags);
+	bp = xfs_buf_get_uncached(mp->m_ddev_targp, numblks, 0);
 	if (!bp)
 		return NULL;
 
@@ -345,7 +344,7 @@  xfs_ag_init_hdr(
 {
 	struct xfs_buf		*bp;
 
-	bp = xfs_get_aghdr_buf(mp, id->daddr, id->numblks, 0, ops);
+	bp = xfs_get_aghdr_buf(mp, id->daddr, id->numblks, ops);
 	if (!bp)
 		return -ENOMEM;