]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Rename PF_IOTHREAD to PF_NOFREEZE
authorAndrew Morton <akpm@osdl.org>
Mon, 19 Apr 2004 05:05:17 +0000 (22:05 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Mon, 19 Apr 2004 05:05:17 +0000 (22:05 -0700)
From: Nigel Cunningham <ncunningham@users.sourceforge.net>

A few weeks ago, Pavel and I agreed that PF_IOTHREAD should be renamed to
PF_NOFREEZE.  This reflects the fact that some threads so marked aren't
actually used for IO while suspending, but simply shouldn't be frozen.
This patch, against 2.6.5 vanilla, applies that change.  In the
refrigerator calls, the actual value doesn't matter (so long as it's
non-zero) and it makes more sense to use PF_FREEZE so I've used that.

30 files changed:
arch/i386/kernel/apm.c
drivers/block/loop.c
drivers/input/serio/serio.c
drivers/md/md.c
drivers/net/8139too.c
drivers/net/irda/sir_kthread.c
drivers/net/irda/stir4200.c
drivers/net/wireless/airo.c
drivers/pcmcia/cs.c
drivers/scsi/libata-core.c
drivers/scsi/scsi_error.c
drivers/usb/core/hub.c
drivers/usb/storage/usb.c
fs/jbd/journal.c
fs/jfs/jfs_logmgr.c
fs/jfs/jfs_txnmgr.c
fs/xfs/linux/xfs_buf.c
fs/xfs/linux/xfs_super.c
include/linux/sched.h
kernel/power/process.c
kernel/sched.c
kernel/softirq.c
kernel/workqueue.c
mm/pdflush.c
mm/vmscan.c
net/bluetooth/bnep/core.c
net/bluetooth/cmtp/core.c
net/bluetooth/rfcomm/core.c
net/sunrpc/sched.c
net/sunrpc/svcsock.c

index 3395d5388909a58f529cba5b7088fcfc94392599..01b05016e11d4fd782909bd1ab14306d5c60f3c8 100644 (file)
@@ -1701,7 +1701,7 @@ static int apm(void *unused)
 
        daemonize("kapmd");
 
-       current->flags |= PF_IOTHREAD;
+       current->flags |= PF_NOFREEZE;
 
 #ifdef CONFIG_SMP
        /* 2002/08/01 - WT
index a43c545071cb66acaaa7e7017b00be35ecfceebe..f9c506d93c69403e7fe82018d57d6327843c723e 100644 (file)
@@ -483,7 +483,7 @@ static int loop_thread(void *data)
         * hence, it mustn't be stopped at all
         * because it could be indirectly used during suspension
         */
-       current->flags |= PF_IOTHREAD;
+       current->flags |= PF_NOFREEZE;
 
        set_user_nice(current, -20);
 
index 0be7dafbed16edd867218e0b7f38057764428f75..13d21bf45941e8de233935f7df88c4ed5311cbc3 100644 (file)
@@ -154,7 +154,7 @@ static int serio_thread(void *nothing)
                serio_handle_events();
                wait_event_interruptible(serio_wait, !list_empty(&serio_event_list)); 
                if (current->flags & PF_FREEZE)
-                       refrigerator(PF_IOTHREAD);
+                       refrigerator(PF_FREEZE);
        } while (!signal_pending(current));
 
        printk(KERN_DEBUG "serio: kseriod exiting\n");
index b521ca509b1ea4cc257389ae0fb2f2975fb74fad..c451c8dba0b8a4f052efdcd49caa935182feb9ca 100644 (file)
@@ -2712,7 +2712,7 @@ int md_thread(void * arg)
                wait_event_interruptible(thread->wqueue,
                                         test_bit(THREAD_WAKEUP, &thread->flags));
                if (current->flags & PF_FREEZE)
-                       refrigerator(PF_IOTHREAD);
+                       refrigerator(PF_FREEZE);
 
                clear_bit(THREAD_WAKEUP, &thread->flags);
 
index baae39b6d99c8f34f7e5a72b53173953fb51096f..d03c3a7e88daea219071b4896fda8f3f56426e9c 100644 (file)
@@ -1619,7 +1619,7 @@ static int rtl8139_thread (void *data)
                        timeout = interruptible_sleep_on_timeout (&tp->thr_wait, timeout);
                        /* make swsusp happy with our thread */
                        if (current->flags & PF_FREEZE)
-                               refrigerator(PF_IOTHREAD);
+                               refrigerator(PF_FREEZE);
                } while (!signal_pending (current) && (timeout > 0));
 
                if (signal_pending (current)) {
index 69d6ee5d28da88bc499ff6567ff9700da10c00a1..e53c6a54c2fd16a4305c8ca9e78124c6b8550f55 100644 (file)
@@ -137,7 +137,7 @@ static int irda_thread(void *startup)
 
                /* make swsusp happy with our thread */
                if (current->flags & PF_FREEZE)
-                       refrigerator(PF_IOTHREAD);
+                       refrigerator(PF_FREEZE);
 
                run_irda_queue();
        }
index 59bc5d86873e21bf633dcdbc2b5a710dcba8fef5..f00f9c4bc8df5112a07753985bfd42d9eb60e0c9 100644 (file)
@@ -774,7 +774,7 @@ static int stir_transmit_thread(void *arg)
 
                        write_reg(stir, REG_CTRL1, CTRL1_TXPWD|CTRL1_RXPWD);
 
-                       refrigerator(PF_IOTHREAD);
+                       refrigerator(PF_FREEZE);
 
                        if (change_speed(stir, stir->speed))
                                break;
index 5545a9ad7736d38f4e36f00cdef3bc6ef2877da8..e7204b7705233fed53f61d103eda565fd2c7f401 100644 (file)
@@ -2883,7 +2883,7 @@ static int airo_thread(void *data) {
 
                /* make swsusp happy with our thread */
                if (current->flags & PF_FREEZE)
-                       refrigerator(PF_IOTHREAD);
+                       refrigerator(PF_FREEZE);
 
                if (test_bit(JOB_DIE, &ai->flags))
                        break;
index c92a8b6eb17636aee36c9ed0924da8c65e5a0417..3763e1dbbf8c2447dc811d9eb4af2ca883ab764c 100644 (file)
@@ -720,7 +720,7 @@ static int pccardd(void *__skt)
 
                schedule();
                if (current->flags & PF_FREEZE)
-                       refrigerator(PF_IOTHREAD);
+                       refrigerator(PF_FREEZE);
 
                if (!skt->thread)
                        break;
index 4487de15884d4124985c291eff8ec595625dae1d..1f439965a7327b6aadb6649251f08ff502580e8c 100644 (file)
@@ -2759,7 +2759,7 @@ static int ata_thread (void *data)
                         flush_signals(current);
                         
                 if (current->flags & PF_FREEZE)
-                       refrigerator(PF_IOTHREAD);
+                       refrigerator(PF_FREEZE);
                                                         
 
                 if ((timeout < 0) || (ap->time_to_die))
index 54487593f6a2a6b269eb6395571c5a842ec82f2a..58ac2319a342c119f1aee7105bff88672f881457 100644 (file)
@@ -1628,7 +1628,7 @@ int scsi_error_handler(void *data)
 
        daemonize("scsi_eh_%d", shost->host_no);
 
-       current->flags |= PF_IOTHREAD;
+       current->flags |= PF_NOFREEZE;
 
        shost->eh_wait = &sem;
        shost->ehandler = current;
index 289e48450d02224ec937bd8c3ab7b715c9e3f970..9aec0030b7393800e65fb96e11725f7fe606cdec 100644 (file)
@@ -1259,7 +1259,7 @@ static int hub_thread(void *__hub)
                hub_events();
                wait_event_interruptible(khubd_wait, !list_empty(&hub_event_list)); 
                if (current->flags & PF_FREEZE)
-                       refrigerator(PF_IOTHREAD);
+                       refrigerator(PF_FREEZE);
        } while (!signal_pending(current));
 
        pr_debug ("%s: khubd exiting\n", usbcore_name);
index ef04888ffd2d51613f6b3ffafc0717c6d6814c95..e32ae272d10bff0cec0d98a7827bc1dbb5e51f33 100644 (file)
@@ -277,7 +277,7 @@ static int usb_stor_control_thread(void * __us)
         */
        daemonize("usb-storage");
 
-       current->flags |= PF_IOTHREAD;
+       current->flags |= PF_NOFREEZE;
 
        unlock_kernel();
 
index f278cafff726995c056753c8688db22f33839ddd..12f71306153a9ca7bbf00652759666d970903090 100644 (file)
@@ -172,7 +172,7 @@ loop:
                 */
                jbd_debug(1, "Now suspending kjournald\n");
                spin_unlock(&journal->j_state_lock);
-               refrigerator(PF_IOTHREAD);
+               refrigerator(PF_FREEZE);
                spin_lock(&journal->j_state_lock);
        } else {
                /*
index b90aa961dd5a36dec14993b4e8040faae6c0b6c1..73569b11c884498a404ecf60e5aff61375995264 100644 (file)
@@ -2328,7 +2328,7 @@ int jfsIOWait(void *arg)
                }
                if (current->flags & PF_FREEZE) {
                        spin_unlock_irq(&log_redrive_lock);
-                       refrigerator(PF_IOTHREAD);
+                       refrigerator(PF_FREEZE);
                } else {
                        add_wait_queue(&jfs_IO_thread_wait, &wq);
                        set_current_state(TASK_INTERRUPTIBLE);
index 7ae1711a429f53668edb8ece09d6409155c1a86b..6c887b9e14575f616c772f55f090d85b0b08f08d 100644 (file)
@@ -2813,7 +2813,7 @@ restart:
 
                if (current->flags & PF_FREEZE) {
                        LAZY_UNLOCK(flags);
-                       refrigerator(PF_IOTHREAD);
+                       refrigerator(PF_FREEZE);
                } else {
                        DECLARE_WAITQUEUE(wq, current);
 
@@ -3024,7 +3024,7 @@ int jfs_sync(void *arg)
 
                if (current->flags & PF_FREEZE) {
                        TXN_UNLOCK();
-                       refrigerator(PF_IOTHREAD);
+                       refrigerator(PF_FREEZE);
                } else {
                        DECLARE_WAITQUEUE(wq, current);
 
index 2d4cf586cf854365a6596f9d8103fdf56356a1e0..d34846671e068334b89c77f7a9bc45a423f6c253 100644 (file)
@@ -1632,7 +1632,7 @@ pagebuf_daemon(
        do {
                /* swsusp */
                if (current->flags & PF_FREEZE)
-                       refrigerator(PF_IOTHREAD);
+                       refrigerator(PF_FREEZE);
 
                set_current_state(TASK_INTERRUPTIBLE);
                schedule_timeout(xfs_flush_interval);
index ba20219afb40f154cc1c3bb4830f5249a76cf3ae..478e7caca9021d4a6daac2a7237995ec7030bc24 100644 (file)
@@ -464,7 +464,7 @@ syncd(void *arg)
                schedule_timeout(xfs_syncd_interval);
                /* swsusp */
                if (current->flags & PF_FREEZE)
-                       refrigerator(PF_IOTHREAD);
+                       refrigerator(PF_FREEZE);
                if (vfsp->vfs_flag & VFS_UMOUNT)
                        break;
                if (vfsp->vfs_flag & VFS_RDONLY)
index 17bbedd6bb3d6fefacf3c9daa9a65cd59dfd63fd..428b48964fc85e2f12f360af8db9bbf025edc59a 100644 (file)
@@ -532,7 +532,7 @@ do { if (atomic_dec_and_test(&(tsk)->usage)) __put_task_struct(tsk); } while(0)
 #define PF_FLUSHER     0x00002000      /* responsible for disk writeback */
 
 #define PF_FREEZE      0x00004000      /* this task should be frozen for suspend */
-#define PF_IOTHREAD    0x00008000      /* this thread is needed for doing I/O to swap */
+#define PF_NOFREEZE    0x00008000      /* this thread should not be frozen */
 #define PF_FROZEN      0x00010000      /* frozen for system suspend */
 #define PF_FSTRANS     0x00020000      /* inside a filesystem transaction */
 #define PF_KSWAPD      0x00040000      /* I am kswapd */
index 8225457183edd02977afe21edf3ddc67958131a8..d65d6a375af7999dd1bfa788c05f128cc6bdf9b9 100644 (file)
@@ -28,7 +28,7 @@
 static inline int freezeable(struct task_struct * p)
 {
        if ((p == current) || 
-           (p->flags & PF_IOTHREAD) || 
+           (p->flags & PF_NOFREEZE) ||
            (p->state == TASK_ZOMBIE) ||
            (p->state == TASK_DEAD) ||
            (p->state == TASK_STOPPED))
index c2d1c031713058b5ffeee8162b20be27fdb7774c..5076121df49d5bd9fd387eb3056ee238d03bf76d 100644 (file)
@@ -2779,7 +2779,7 @@ static int migration_thread(void * data)
                migration_req_t *req;
 
                if (current->flags & PF_FREEZE)
-                       refrigerator(PF_IOTHREAD);
+                       refrigerator(PF_FREEZE);
 
                spin_lock_irq(&rq->lock);
                head = &rq->migration_queue;
index 58c915c202ff6e87e81b081fba6813248a6f79be..c336ae21b5d7deedfa2866bf3280a5d3f472a599 100644 (file)
@@ -323,7 +323,7 @@ void __init softirq_init(void)
 static int ksoftirqd(void * __bind_cpu)
 {
        set_user_nice(current, 19);
-       current->flags |= PF_IOTHREAD;
+       current->flags |= PF_NOFREEZE;
 
        set_current_state(TASK_INTERRUPTIBLE);
 
index 2046c6d763fed3ed20c651a7e20418188efece7d..1f9b47613146df9f165becb44bd928539d28f59c 100644 (file)
@@ -181,7 +181,7 @@ static int worker_thread(void *__cwq)
        struct k_sigaction sa;
        sigset_t blocked;
 
-       current->flags |= PF_IOTHREAD;
+       current->flags |= PF_NOFREEZE;
 
        set_user_nice(current, -10);
 
index c2f49a1b38b8f53241437caf1eb8cbef7db136aa..1e682bed9a5eeea1dfdee4d2836013b364c9dbac 100644 (file)
@@ -107,7 +107,7 @@ static int __pdflush(struct pdflush_work *my_work)
 
                schedule();
                if (current->flags & PF_FREEZE) {
-                       refrigerator(PF_IOTHREAD);
+                       refrigerator(PF_FREEZE);
                        spin_lock_irq(&pdflush_lock);
                        continue;
                }
index 55d8feae21a285c38c8fc33a9b0b123c655dddf9..f78921216cfb3845a80859526b44409fbb36f0f8 100644 (file)
@@ -1067,7 +1067,7 @@ int kswapd(void *p)
                struct page_state ps;
 
                if (current->flags & PF_FREEZE)
-                       refrigerator(PF_IOTHREAD);
+                       refrigerator(PF_FREEZE);
                prepare_to_wait(&pgdat->kswapd_wait, &wait, TASK_INTERRUPTIBLE);
                schedule();
                finish_wait(&pgdat->kswapd_wait, &wait);
index 5292b6c50975fa318a88b850fabccbebd32b4f8e..ce7b9a51934c6aa380a37e1f6312cd0ab820922f 100644 (file)
@@ -458,7 +458,7 @@ static int bnep_session(void *arg)
 
         daemonize("kbnepd %s", dev->name);
        set_user_nice(current, -15);
-       current->flags |= PF_IOTHREAD;
+       current->flags |= PF_NOFREEZE;
 
         set_fs(KERNEL_DS);
 
index 1aadecd45d7e8997408c89aeb9a289dc4763ac66..5d3d0dccee07e859846d27ca250fa9d2129bc7c4 100644 (file)
@@ -293,7 +293,7 @@ static int cmtp_session(void *arg)
 
        daemonize("kcmtpd_ctr_%d", session->num);
        set_user_nice(current, -15);
-       current->flags |= PF_IOTHREAD;
+       current->flags |= PF_NOFREEZE;
 
        set_fs(KERNEL_DS);
 
index 2e7e3ec4c0a51d70b84743aea034a25a9fccb481..8ac33f3b0ebe523664948ab5bba17f28232e7c17 100644 (file)
@@ -1819,7 +1819,7 @@ static int rfcomm_run(void *unused)
 
        daemonize("krfcommd");
        set_user_nice(current, -10);
-       current->flags |= PF_IOTHREAD;
+       current->flags |= PF_NOFREEZE;
 
        set_fs(KERNEL_DS);
 
index 374b6764331a7cdc3a24cbc2387b2f27ba1609ad..ae45a763a09d1920e17f295957138510ef1b4a5f 100644 (file)
@@ -1127,7 +1127,7 @@ rpciod(void *ptr)
                __rpc_schedule();
                if (current->flags & PF_FREEZE) {
                        spin_unlock_bh(&rpc_queue_lock);
-                       refrigerator(PF_IOTHREAD);
+                       refrigerator(PF_FREEZE);
                        spin_lock_bh(&rpc_queue_lock);
                }
 
index 8c39d85c51230350c1147789be5b88ae8675ec29..3152928c756e752ec5190025925779a566b51130 100644 (file)
@@ -1232,7 +1232,7 @@ svc_recv(struct svc_serv *serv, struct svc_rqst *rqstp, long timeout)
                schedule_timeout(timeout);
 
                if (current->flags & PF_FREEZE)
-                       refrigerator(PF_IOTHREAD);
+                       refrigerator(PF_FREEZE);
 
                spin_lock_bh(&serv->sv_lock);
                remove_wait_queue(&rqstp->rq_wait, &wait);