提交 ee2a4f7c 编写于 作者: N Nathan Scott

[XFS] Fix an intermittent pquota panic caused by dodgey quota flags to an

umount dquot flush call.

SGI-PV: 946444
SGI-Modid: xfs-linux-melb:xfs-kern:24680a
Signed-off-by: NNathan Scott <nathans@sgi.com>
上级 3ddb8fa9
...@@ -1920,9 +1920,7 @@ xfs_qm_quotacheck( ...@@ -1920,9 +1920,7 @@ xfs_qm_quotacheck(
* at this point (because we intentionally didn't in dqget_noattach). * at this point (because we intentionally didn't in dqget_noattach).
*/ */
if (error) { if (error) {
xfs_qm_dqpurge_all(mp, xfs_qm_dqpurge_all(mp, XFS_QMOPT_QUOTALL | XFS_QMOPT_QUOTAOFF);
XFS_QMOPT_UQUOTA|XFS_QMOPT_GQUOTA|
XFS_QMOPT_PQUOTA|XFS_QMOPT_QUOTAOFF);
goto error_return; goto error_return;
} }
/* /*
...@@ -2745,6 +2743,7 @@ xfs_qm_vop_dqattach_and_dqmod_newinode( ...@@ -2745,6 +2743,7 @@ xfs_qm_vop_dqattach_and_dqmod_newinode(
xfs_dqunlock(udqp); xfs_dqunlock(udqp);
ASSERT(ip->i_udquot == NULL); ASSERT(ip->i_udquot == NULL);
ip->i_udquot = udqp; ip->i_udquot = udqp;
ASSERT(XFS_IS_UQUOTA_ON(tp->t_mountp));
ASSERT(ip->i_d.di_uid == be32_to_cpu(udqp->q_core.d_id)); ASSERT(ip->i_d.di_uid == be32_to_cpu(udqp->q_core.d_id));
xfs_trans_mod_dquot(tp, udqp, XFS_TRANS_DQ_ICOUNT, 1); xfs_trans_mod_dquot(tp, udqp, XFS_TRANS_DQ_ICOUNT, 1);
} }
...@@ -2754,7 +2753,10 @@ xfs_qm_vop_dqattach_and_dqmod_newinode( ...@@ -2754,7 +2753,10 @@ xfs_qm_vop_dqattach_and_dqmod_newinode(
xfs_dqunlock(gdqp); xfs_dqunlock(gdqp);
ASSERT(ip->i_gdquot == NULL); ASSERT(ip->i_gdquot == NULL);
ip->i_gdquot = gdqp; ip->i_gdquot = gdqp;
ASSERT(ip->i_d.di_gid == be32_to_cpu(gdqp->q_core.d_id)); ASSERT(XFS_IS_OQUOTA_ON(tp->t_mountp));
ASSERT((XFS_IS_GQUOTA_ON(tp->t_mountp) ?
ip->i_d.di_gid : ip->i_d.di_projid) ==
be32_to_cpu(gdqp->q_core.d_id));
xfs_trans_mod_dquot(tp, gdqp, XFS_TRANS_DQ_ICOUNT, 1); xfs_trans_mod_dquot(tp, gdqp, XFS_TRANS_DQ_ICOUNT, 1);
} }
} }
......
...@@ -1077,8 +1077,7 @@ xfs_unmountfs(xfs_mount_t *mp, struct cred *cr) ...@@ -1077,8 +1077,7 @@ xfs_unmountfs(xfs_mount_t *mp, struct cred *cr)
xfs_iflush_all(mp); xfs_iflush_all(mp);
XFS_QM_DQPURGEALL(mp, XFS_QM_DQPURGEALL(mp, XFS_QMOPT_QUOTALL | XFS_QMOPT_UMOUNTING);
XFS_QMOPT_UQUOTA | XFS_QMOPT_GQUOTA | XFS_QMOPT_UMOUNTING);
/* /*
* Flush out the log synchronously so that we know for sure * Flush out the log synchronously so that we know for sure
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册