Index: linux-2.6.18-128.1.6/fs/jbd2/commit.c
===================================================================
---- linux-2.6.18-128.1.6.orig/fs/jbd2/commit.c 2009-04-15 08:35:28.000000000 +0530
-+++ linux-2.6.18-128.1.6/fs/jbd2/commit.c 2009-05-28 15:12:45.000000000 +0530
-@@ -898,6 +898,30 @@
+--- linux-2.6.18-164.6.1/fs/jbd2/commit.c 2010-01-21 11:24:52.000000000 +0530
++++ linux-2.6.18-164.6.1_new/fs/jbd2/commit.c 2010-01-21 11:26:36.000000000 +0530
+@@ -832,6 +832,29 @@ wait_for_iobuf:
+ processing: any buffers committed as a result of this
transaction can be removed from any checkpoint list it was on
before. */
-
+ /*
+ * Call any callbacks that had been registered for handles in this
+ * transaction. It is up to the callback to free any allocated
+ }
+ }
+ spin_unlock(&commit_transaction->t_jcb_lock);
-+
- jbd_debug(3, "JBD: commit phase 7\n");
- J_ASSERT(commit_transaction->t_sync_datalist == NULL);
+ jbd_debug(3, "JBD: commit phase 6\n");
+
Index: linux-2.6.18-128.1.6/fs/jbd2/journal.c
===================================================================
--- linux-2.6.18-128.1.6.orig/fs/jbd2/journal.c 2009-04-15 08:35:28.000000000 +0530
static void filter_fini_destroy(struct obd_device *obd,
struct lustre_handle *lockh)
{
- if (lockh->cookie)
+ if (lustre_handle_is_used(lockh))
ldlm_lock_decref(lockh, LCK_PW);
}
GOTO(cleanup, rc = -ENOENT);
}
- filter_prepare_destroy(obd, oa->o_id, oa->o_gr, &lockh);
+ rc = filter_prepare_destroy(obd, oa->o_id, oa->o_gr, &lockh);
+ if (rc)
+ GOTO(cleanup, rc);
/* Our MDC connection is established by the MDS to us */
if (oa->o_valid & OBD_MD_FLCOOKIE) {