git » libjio » commit fe4ca8d

jtrans_rollback(): Set the new transaction's numops

author Alberto Bertogli
2009-03-09 05:21:53 UTC
committer Alberto Bertogli
2009-03-09 05:26:36 UTC
parent 385f81d3862354c8522aedf06da20a3a8545833f

jtrans_rollback(): Set the new transaction's numops

The number of operations is not properly set in the new transaction. It
used to work fine just by chance (most code doesn't look into numops), but
the previous patch uncovered this problem.

This patch fixes it by setting numops appropriately.

Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>

trans.c +1 -0

diff --git a/trans.c b/trans.c
index ba30674..6ff54c2 100644
--- a/trans.c
+++ b/trans.c
@@ -471,6 +471,7 @@ ssize_t jtrans_rollback(struct jtrans *ts)
 
 	jtrans_init(ts->fs, &newts);
 	newts.flags = ts->flags;
+	newts.numops = ts->numops;
 
 	if (ts->op == NULL || ts->flags & J_NOROLLBACK) {
 		rv = -1;