]> err.no Git - linux-2.6/blobdiff - fs/jfs/jfs_txnmgr.c
JFS: Improve sync barrier processing
[linux-2.6] / fs / jfs / jfs_txnmgr.c
index 121c981ff45363bef9af40c859132ba3e03007f0..3555acff12d0c5009520d9d672f17fe3e476bcfc 100644 (file)
@@ -552,6 +552,11 @@ void txEnd(tid_t tid)
                 * synchronize with logsync barrier
                 */
                if (test_bit(log_SYNCBARRIER, &log->flag)) {
+                       TXN_UNLOCK();
+
+                       /* write dirty metadata & forward log syncpt */
+                       jfs_syncpt(log, 1);
+
                        jfs_info("log barrier off: 0x%x", log->lsn);
 
                        /* enable new transactions start */
@@ -560,11 +565,6 @@ void txEnd(tid_t tid)
                        /* wakeup all waitors for logsync barrier */
                        TXN_WAKEUP(&log->syncwait);
 
-                       TXN_UNLOCK();
-
-                       /* forward log syncpt */
-                       jfs_syncpt(log);
-
                        goto wakeup;
                }
        }