[Yaffs] Odp: Odp: Problem with power management and yaffs

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Andrzej
Date:  
To: yaffs
Subject: [Yaffs] Odp: Odp: Problem with power management and yaffs
Dnia 2-09-2011 o godz. 11:24 Andrzej napisał(a):
> Hello again.
>
> Fixed by small changes in the file fs/yaffs2/yaffs_vfs.c
> 1. "#include <linux/freezer.h>" replaced by "#include <linux/sched.h>"
> 2. commented out the line containing "set_freezable();"
>
> Regards
> Andrzej


I think patch is better idea:

--- fs/yaffs2.old/yaffs_vfs.c    2011-09-01 15:43:20.000000000 +0200
+++ fs/yaffs2/yaffs_vfs.c       2011-09-02 13:36:07.000000000 +0200
@@ -41,6 +41,8 @@
 #define YAFFS_COMPILE_BACKGROUND
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 23))
 #define YAFFS_COMPILE_FREEZER
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 18))
+#define YAFFS_COMPILE_SCHEDULER
 #endif
 #endif


@@ -96,6 +98,9 @@
#ifdef YAFFS_COMPILE_FREEZER
#include <linux/freezer.h>
#endif
+#ifdef YAFFS_COMPILE_SCHEDULER
+#include <linux/sched.h>
+#endif

#include <asm/div64.h>

@@ -2261,7 +2266,7 @@
                if (kthread_should_stop())
                        break;


-#ifdef YAFFS_COMPILE_FREEZER
+#ifdef YAFFS_COMPILE_FREEZER || YAFFS_COMPILE_SCHEDULER
                if (try_to_freeze())
                        continue;
 #endif


Andrzej