* [PATCH] XFS: Compare, don't assign in ASSERT() in xfs_trans_unreserve_and_mod_sb()
@ 2010-12-25 20:14 Jesper Juhl
2010-12-27 14:13 ` Dave Chinner
0 siblings, 1 reply; 2+ messages in thread
From: Jesper Juhl @ 2010-12-25 20:14 UTC (permalink / raw)
To: xfs; +Cc: xfs-masters, linux-kernel, Alex Elder
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@chaosbits.net>
---
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@chaosbits.net> http://www.chaosbits.net/
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please.
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] XFS: Compare, don't assign in ASSERT() in xfs_trans_unreserve_and_mod_sb()
2010-12-25 20:14 [PATCH] XFS: Compare, don't assign in ASSERT() in xfs_trans_unreserve_and_mod_sb() Jesper Juhl
@ 2010-12-27 14:13 ` Dave Chinner
0 siblings, 0 replies; 2+ messages in thread
From: Dave Chinner @ 2010-12-27 14:13 UTC (permalink / raw)
To: Jesper Juhl; +Cc: xfs, xfs-masters, linux-kernel, Alex Elder
On Sat, Dec 25, 2010 at 09:14:53PM +0100, Jesper Juhl wrote:
> 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.
Already fixed in this patch pending for 2.6.38:
http://git.kernel.org/?p=linux/kernel/git/dgc/xfsdev.git;a=commitdiff;h=831ef3cf682a1f9d8fc7c16dace55137751c0410
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-12-27 14:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-25 20:14 [PATCH] XFS: Compare, don't assign in ASSERT() in xfs_trans_unreserve_and_mod_sb() Jesper Juhl
2010-12-27 14:13 ` Dave Chinner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).