diff mbox series

[5/5] xfs: move xfs_inew_wait call into xfs_dqrele_inode

Message ID 162250087868.490412.809961177992047138.stgit@locust (mailing list archive)
State Superseded
Headers show
Series xfs: clean up quotaoff inode walks | expand

Commit Message

Darrick J. Wong May 31, 2021, 10:41 p.m. UTC
From: Darrick J. Wong <djwong@kernel.org>

Move the INEW wait into xfs_dqrele_inode so that we can drop the
iter_flags parameter in the next patch.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
---
 fs/xfs/xfs_icache.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

Comments

Dave Chinner June 1, 2021, 12:47 a.m. UTC | #1
On Mon, May 31, 2021 at 03:41:18PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
> 
> Move the INEW wait into xfs_dqrele_inode so that we can drop the
> iter_flags parameter in the next patch.

What next patch? :/

> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
> ---
>  fs/xfs/xfs_icache.c |    7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> 
> diff --git a/fs/xfs/xfs_icache.c b/fs/xfs/xfs_icache.c
> index 5501318b5db0..859ab1279d8d 100644
> --- a/fs/xfs/xfs_icache.c
> +++ b/fs/xfs/xfs_icache.c
> @@ -981,6 +981,9 @@ xfs_dqrele_inode(
>  {
>  	struct xfs_eofblocks	*eofb = priv;
>  
> +	if (xfs_iflags_test(ip, XFS_INEW))
> +		xfs_inew_wait(ip);
> +
>  	xfs_ilock(ip, XFS_ILOCK_EXCL);
>  	if (eofb->eof_flags & XFS_EOFB_DROP_UDQUOT) {
>  		xfs_qm_dqrele(ip->i_udquot);
> @@ -1019,8 +1022,8 @@ xfs_dqrele_all_inodes(
>  	if (qflags & XFS_PQUOTA_ACCT)
>  		eofb.eof_flags |= XFS_EOFB_DROP_PDQUOT;
>  
> -	return xfs_inode_walk(mp, XFS_INODE_WALK_INEW_WAIT, xfs_dqrele_inode,
> -			&eofb, XFS_ICI_DQRELE_NONTAG);
> +	return xfs_inode_walk(mp, 0, xfs_dqrele_inode, &eofb,
> +			XFS_ICI_DQRELE_NONTAG);
>  }

In isolation, this doesn't mean a whole lot. It seems somewhat
related to the earlier patch that kinda duplicated
xfs_inode_walk_ag_grab(), and it looks like this removes the only
user of XFS_INODE_WALK_INEW_WAIT, so does the missing next patch
remove XFS_INODE_WALK_INEW_WAIT and the rest of the that machinery?

If so, this seems like it should follow up the earlier patch or even
precede it, because getting rid of XFS_INODE_WALK_INEW_WAIT first
means that xfs_inode_walk_ag_grab() and xfs_inode_walk_dquot_grab()
are then identical....

Cheers,

Dave.
diff mbox series

Patch

diff --git a/fs/xfs/xfs_icache.c b/fs/xfs/xfs_icache.c
index 5501318b5db0..859ab1279d8d 100644
--- a/fs/xfs/xfs_icache.c
+++ b/fs/xfs/xfs_icache.c
@@ -981,6 +981,9 @@  xfs_dqrele_inode(
 {
 	struct xfs_eofblocks	*eofb = priv;
 
+	if (xfs_iflags_test(ip, XFS_INEW))
+		xfs_inew_wait(ip);
+
 	xfs_ilock(ip, XFS_ILOCK_EXCL);
 	if (eofb->eof_flags & XFS_EOFB_DROP_UDQUOT) {
 		xfs_qm_dqrele(ip->i_udquot);
@@ -1019,8 +1022,8 @@  xfs_dqrele_all_inodes(
 	if (qflags & XFS_PQUOTA_ACCT)
 		eofb.eof_flags |= XFS_EOFB_DROP_PDQUOT;
 
-	return xfs_inode_walk(mp, XFS_INODE_WALK_INEW_WAIT, xfs_dqrele_inode,
-			&eofb, XFS_ICI_DQRELE_NONTAG);
+	return xfs_inode_walk(mp, 0, xfs_dqrele_inode, &eofb,
+			XFS_ICI_DQRELE_NONTAG);
 }
 
 /*