From: Kaixu Xia Date: Thu, 23 Apr 2020 04:54:29 +0000 (-0700) Subject: xfs: remove unnecessary assertion from xfs_qm_vop_create_dqattach X-Git-Tag: v5.8-rc1~185^2~123 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7994aae8516aa35ca26dba64cf8d6938e93c2265;p=thirdparty%2Flinux.git xfs: remove unnecessary assertion from xfs_qm_vop_create_dqattach The check XFS_IS_QUOTA_RUNNING() has been done when enter the xfs_qm_vop_create_dqattach() function, it will return directly if the result is false, so the followed XFS_IS_QUOTA_RUNNING() assertion is unnecessary. If we truly care about this, the check also can be added to the condition of next if statements. Signed-off-by: Kaixu Xia Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong --- diff --git a/fs/xfs/xfs_qm.c b/fs/xfs/xfs_qm.c index b684b0410a527..fc93f88a99265 100644 --- a/fs/xfs/xfs_qm.c +++ b/fs/xfs/xfs_qm.c @@ -1932,7 +1932,6 @@ xfs_qm_vop_create_dqattach( return; ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL)); - ASSERT(XFS_IS_QUOTA_RUNNING(mp)); if (udqp && XFS_IS_UQUOTA_ON(mp)) { ASSERT(ip->i_udquot == NULL);