All of lore.kernel.org
 help / color / mirror / Atom feed
From: xiakaixu1987@gmail.com
To: linux-xfs@vger.kernel.org
Cc: darrick.wong@oracle.com, Kaixu Xia <kaixuxia@tencent.com>
Subject: [PATCH] xfs: remove unnecessary assertion from xfs_qm_vop_create_dqattach
Date: Fri, 10 Apr 2020 11:25:41 +0800	[thread overview]
Message-ID: <1586489141-4708-1-git-send-email-kaixuxia@tencent.com> (raw)

From: Kaixu Xia <kaixuxia@tencent.com>

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 maybe the followed XFS_IS_QUOTA_RUNNING()
assertion is unnecessary. If we truly care about this, the check also
can be added to the next if statements.

Signed-off-by: Kaixu Xia <kaixuxia@tencent.com>
---
 fs/xfs/xfs_qm.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/xfs/xfs_qm.c b/fs/xfs/xfs_qm.c
index b684b04..fc93f88 100644
--- a/fs/xfs/xfs_qm.c
+++ b/fs/xfs/xfs_qm.c
@@ -1932,7 +1932,6 @@ struct xfs_dquot *
 		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);
-- 
1.8.3.1


                 reply	other threads:[~2020-04-10  3:25 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1586489141-4708-1-git-send-email-kaixuxia@tencent.com \
    --to=xiakaixu1987@gmail.com \
    --cc=darrick.wong@oracle.com \
    --cc=kaixuxia@tencent.com \
    --cc=linux-xfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.