Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=88f18ba028b5939bb6f77bd690e5ad8d01bb24cc
Commit:     88f18ba028b5939bb6f77bd690e5ad8d01bb24cc
Parent:     5fcc57f2d5d558056668159f9153bf21d2c53d16
Author:     Gautham R Shenoy <[EMAIL PROTECTED]>
AuthorDate: Wed May 23 13:57:29 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Wed May 23 20:14:11 2007 -0700

    freezer: move frozen_process() to kernel/power/process.c
    
    Other than refrigerator, no one else calls frozen_process().  So move it 
from
    include/linux/freezer.h to kernel/power/process.c.
    
    Also, since a task can be marked as frozen by itself, we don't need to pass
    the (struct task_struct *p) parameter to frozen_process().
    
    Signed-off-by: Gautham R Shenoy <[EMAIL PROTECTED]>
    Signed-off-by: Rafael J. Wysocki <[EMAIL PROTECTED]>
    Cc: Oleg Nesterov <[EMAIL PROTECTED]>
    Cc: Pavel Machek <[EMAIL PROTECTED]>
    Cc: "Eric W. Biederman" <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 include/linux/freezer.h |   13 -------------
 kernel/power/process.c  |   14 +++++++++++++-
 2 files changed, 13 insertions(+), 14 deletions(-)

diff --git a/include/linux/freezer.h b/include/linux/freezer.h
index 1045ee9..4631086 100644
--- a/include/linux/freezer.h
+++ b/include/linux/freezer.h
@@ -58,18 +58,6 @@ static inline int thaw_process(struct task_struct *p)
        return 0;
 }
 
-/*
- * freezing is complete, mark process as frozen
- */
-static inline void frozen_process(struct task_struct *p)
-{
-       if (!unlikely(p->flags & PF_NOFREEZE)) {
-               p->flags |= PF_FROZEN;
-               wmb();
-       }
-       clear_tsk_thread_flag(p, TIF_FREEZE);
-}
-
 extern void refrigerator(void);
 extern int freeze_processes(void);
 extern void thaw_processes(void);
@@ -132,7 +120,6 @@ static inline int frozen(struct task_struct *p) { return 0; 
}
 static inline int freezing(struct task_struct *p) { return 0; }
 static inline void freeze(struct task_struct *p) { BUG(); }
 static inline int thaw_process(struct task_struct *p) { return 1; }
-static inline void frozen_process(struct task_struct *p) { BUG(); }
 
 static inline void refrigerator(void) {}
 static inline int freeze_processes(void) { BUG(); return 0; }
diff --git a/kernel/power/process.c b/kernel/power/process.c
index 2cea265..d31d638 100644
--- a/kernel/power/process.c
+++ b/kernel/power/process.c
@@ -31,6 +31,18 @@ static inline int freezeable(struct task_struct * p)
        return 1;
 }
 
+/*
+ * freezing is complete, mark current process as frozen
+ */
+static inline void frozen_process(void)
+{
+       if (!unlikely(current->flags & PF_NOFREEZE)) {
+               current->flags |= PF_FROZEN;
+               wmb();
+       }
+       clear_tsk_thread_flag(current, TIF_FREEZE);
+}
+
 /* Refrigerator is place where frozen processes are stored :-). */
 void refrigerator(void)
 {
@@ -40,7 +52,7 @@ void refrigerator(void)
 
        task_lock(current);
        if (freezing(current)) {
-               frozen_process(current);
+               frozen_process();
                task_unlock(current);
        } else {
                task_unlock(current);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to