]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/jfs/jfs_logmgr.c
Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreq
[linux-2.6-omap-h63xx.git] / fs / jfs / jfs_logmgr.c
index dfa1200daa61c22f6b96bdff1130d88090a25006..22815e88e7cc0caa85ccdf4220d2777b1929b363 100644 (file)
@@ -71,6 +71,7 @@
 #include "jfs_incore.h"
 #include "jfs_filsys.h"
 #include "jfs_metapage.h"
+#include "jfs_superblock.h"
 #include "jfs_txnmgr.h"
 #include "jfs_debug.h"
 
@@ -166,14 +167,6 @@ static LIST_HEAD(jfs_external_logs);
 static struct jfs_log *dummy_log = NULL;
 static DECLARE_MUTEX(jfs_log_sem);
 
-/*
- * external references
- */
-extern void txLazyUnlock(struct tblock * tblk);
-extern int jfs_stop_threads;
-extern struct completion jfsIOwait;
-extern int jfs_tlocks_low;
-
 /*
  * forward references
  */
@@ -1037,7 +1030,8 @@ static int lmLogSync(struct jfs_log * log, int nosyncwait)
         * starting until all current transactions are completed
         * by setting syncbarrier flag.
         */
-       if (written > LOGSYNC_BARRIER(logsize) && logsize > 32 * LOGPSIZE) {
+       if (!test_bit(log_SYNCBARRIER, &log->flag) &&
+           (written > LOGSYNC_BARRIER(logsize)) && log->active) {
                set_bit(log_SYNCBARRIER, &log->flag);
                jfs_info("log barrier on: lsn=0x%x syncpt=0x%x", lsn,
                         log->syncpt);
@@ -1624,6 +1618,8 @@ void jfs_flush_journal(struct jfs_log *log, int wait)
                }
        }
        assert(list_empty(&log->cqueue));
+
+#ifdef CONFIG_JFS_DEBUG
        if (!list_empty(&log->synclist)) {
                struct logsyncblk *lp;
 
@@ -1638,9 +1634,8 @@ void jfs_flush_journal(struct jfs_log *log, int wait)
                                dump_mem("orphan tblock", lp,
                                         sizeof(struct tblock));
                }
-//             current->state = TASK_INTERRUPTIBLE;
-//             schedule();
        }
+#endif
        //assert(list_empty(&log->synclist));
        clear_bit(log_FLUSH, &log->flag);
 }
@@ -2365,9 +2360,9 @@ int jfsIOWait(void *arg)
                        lbmStartIO(bp);
                        spin_lock_irq(&log_redrive_lock);
                }
-               if (current->flags & PF_FREEZE) {
+               if (freezing(current)) {
                        spin_unlock_irq(&log_redrive_lock);
-                       refrigerator(PF_FREEZE);
+                       refrigerator();
                } else {
                        add_wait_queue(&jfs_IO_thread_wait, &wq);
                        set_current_state(TASK_INTERRUPTIBLE);