提交 85d5f361 编写于 作者: D Darrick J. Wong 提交者: Zheng Zengkai

xfs: move xfs_inew_wait call into xfs_dqrele_inode

mainline-inclusion
from mainline-v5.13-rc4
commit 9d2793ce
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I4KIAO
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9d2793ceecb9fd711f70a860685b71129cac5dc9

-------------------------------------------------

Move the INEW wait into xfs_dqrele_inode so that we can drop the
iter_flags parameter in the next patch.
Signed-off-by: NDarrick J. Wong <djwong@kernel.org>
Reviewed-by: NDave Chinner <dchinner@redhat.com>
Signed-off-by: NLihong Kou <koulihong@huawei.com>
Reviewed-by: NZhang Yi <yi.zhang@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 ccb7c188
...@@ -816,6 +816,9 @@ xfs_dqrele_inode( ...@@ -816,6 +816,9 @@ xfs_dqrele_inode(
{ {
struct xfs_eofblocks *eofb = priv; struct xfs_eofblocks *eofb = priv;
if (xfs_iflags_test(ip, XFS_INEW))
xfs_inew_wait(ip);
xfs_ilock(ip, XFS_ILOCK_EXCL); xfs_ilock(ip, XFS_ILOCK_EXCL);
if (eofb->eof_flags & XFS_ICWALK_FLAG_DROP_UDQUOT) { if (eofb->eof_flags & XFS_ICWALK_FLAG_DROP_UDQUOT) {
xfs_qm_dqrele(ip->i_udquot); xfs_qm_dqrele(ip->i_udquot);
...@@ -852,8 +855,7 @@ xfs_dqrele_all_inodes( ...@@ -852,8 +855,7 @@ xfs_dqrele_all_inodes(
if (qflags & XFS_PQUOTA_ACCT) if (qflags & XFS_PQUOTA_ACCT)
eofb.eof_flags |= XFS_ICWALK_FLAG_DROP_PDQUOT; eofb.eof_flags |= XFS_ICWALK_FLAG_DROP_PDQUOT;
return xfs_icwalk(mp, XFS_INODE_WALK_INEW_WAIT, xfs_dqrele_inode, return xfs_icwalk(mp, 0, xfs_dqrele_inode, &eofb, XFS_ICWALK_DQRELE);
&eofb, XFS_ICWALK_DQRELE);
} }
#else #else
# define xfs_dqrele_igrab(ip) (false) # define xfs_dqrele_igrab(ip) (false)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册