xfs
[Top] [All Lists]

[PATCH] XFS: Compare, don't assign in ASSERT() in xfs_trans_unreserve_an

To: xfs@xxxxxxxxxxx
Subject: [PATCH] XFS: Compare, don't assign in ASSERT() in xfs_trans_unreserve_and_mod_sb()
From: Jesper Juhl <jj@xxxxxxxxxxxxx>
Date: Sat, 25 Dec 2010 21:14:53 +0100 (CET)
Cc: xfs-masters@xxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, Alex Elder <aelder@xxxxxxx>
User-agent: Alpine 2.00 (LNX 1167 2008-08-23)
Hi,

In fs/xfs/xfs_trans.c::xfs_trans_unreserve_and_mod_sb() at the out: label 
we have this:
        ASSERT(error = 0);
I believe a comparison was intended, not an assignment. If I'm right, the 
patch below fixes that up.

Signed-off-by: Jesper Juhl <jj@xxxxxxxxxxxxx>
---
 xfs_trans.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

  compile tested only.

diff --git a/fs/xfs/xfs_trans.c b/fs/xfs/xfs_trans.c
index f6d956b..0e312b9 100644
--- a/fs/xfs/xfs_trans.c
+++ b/fs/xfs/xfs_trans.c
@@ -1137,7 +1137,7 @@ out_undo_fdblocks:
        if (blkdelta)
                xfs_icsb_modify_counters(mp, XFS_SBS_FDBLOCKS, -blkdelta, rsvd);
 out:
-       ASSERT(error = 0);
+       ASSERT(error == 0);
        return;
 }
 

-- 
Jesper Juhl <jj@xxxxxxxxxxxxx>            http://www.chaosbits.net/
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please.

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