Fix problems where some versions were not compiling.
Signed-off-by: Charles Manning <cdhmanning@gmail.com>
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 10))
#define YAFFS_COMPILE_BACKGROUND
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 10))
#define YAFFS_COMPILE_BACKGROUND
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6, 23))
+#define YAFFS_COMPILE_FREEZER
+#endif
#endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28))
#endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28))
#ifdef YAFFS_COMPILE_BACKGROUND
#include <linux/kthread.h>
#include <linux/delay.h>
#ifdef YAFFS_COMPILE_BACKGROUND
#include <linux/kthread.h>
#include <linux/delay.h>
+#endif
+#ifdef YAFFS_COMPILE_FREEZER
#include <linux/freezer.h>
#endif
#include <linux/freezer.h>
#endif
truncate_setsize(inode,newsize);
return 0;
#else
truncate_setsize(inode,newsize);
return 0;
#else
- return simple_setsize(inode, newsize);
+ truncate_inode_pages(&inode->i_data,newsize);
+ return 0;
(TSTR("yaffs_background starting for dev %p\n"),
(void *)dev));
(TSTR("yaffs_background starting for dev %p\n"),
(void *)dev));
+#ifdef YAFFS_COMPILE_FREEZER
while(context->bgRunning){
T(YAFFS_TRACE_BACKGROUND,
(TSTR("yaffs_background\n")));
while(context->bgRunning){
T(YAFFS_TRACE_BACKGROUND,
(TSTR("yaffs_background\n")));
if(kthread_should_stop())
break;
if(kthread_should_stop())
break;
+#ifdef YAFFS_COMPILE_FREEZER
if(try_to_freeze())
continue;
if(try_to_freeze())
continue;
yaffs_GrossLock(dev);
now = jiffies;
yaffs_GrossLock(dev);
now = jiffies;