xfs
[Top] [All Lists]

[PATCH 035/102] xfs: xfs_trans_add_item() - don't assign in ASSERT() whe

To: xfs@xxxxxxxxxxx
Subject: [PATCH 035/102] xfs: xfs_trans_add_item() - don't assign in ASSERT() when compare is intended
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Thu, 23 Aug 2012 15:01:53 +1000
In-reply-to: <1345698180-13612-1-git-send-email-david@xxxxxxxxxxxxx>
References: <1345698180-13612-1-git-send-email-david@xxxxxxxxxxxxx>
From: Jesper Juhl <jj@xxxxxxxxxxxxx>

Upstream commit: f65020a83ad570c1788f7d8ece67f3487166576b

It looks to me like the two ASSERT()s in xfs_trans_add_item() really
want to do a compare (==) rather than assignment (=).
This patch changes it from the latter to the former.

Signed-off-by: Jesper Juhl <jj@xxxxxxxxxxxxx>
Signed-off-by: Ben Myers <bpm@xxxxxxx>

(cherry picked from commit 05293485a0b6b1f803e8a3c0ff188c38f6969985)
---
 fs/xfs/xfs_trans.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/xfs/xfs_trans.c b/fs/xfs/xfs_trans.c
index efc147f..9b4437d 100644
--- a/fs/xfs/xfs_trans.c
+++ b/fs/xfs/xfs_trans.c
@@ -1151,8 +1151,8 @@ xfs_trans_add_item(
 {
        struct xfs_log_item_desc *lidp;
 
-       ASSERT(lip->li_mountp = tp->t_mountp);
-       ASSERT(lip->li_ailp = tp->t_mountp->m_ail);
+       ASSERT(lip->li_mountp == tp->t_mountp);
+       ASSERT(lip->li_ailp == tp->t_mountp->m_ail);
 
        lidp = kmem_zone_zalloc(xfs_log_item_desc_zone, KM_SLEEP | KM_NOFS);
 
-- 
1.7.10

<Prev in Thread] Current Thread [Next in Thread>