Btrfs: Add backport for the kthread work on kernels older than 2.6.20
authorChris Mason <chris.mason@oracle.com>
Wed, 11 Jun 2008 21:09:48 +0000 (17:09 -0400)
committerChris Mason <chris.mason@oracle.com>
Thu, 25 Sep 2008 15:04:03 +0000 (11:04 -0400)
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/async-thread.c

index 2911b67bd6f7da198954a8c1422e4028ba304e4c..8b9e2cf5060685ba64fe8b29d309b85b7b7a5368 100644 (file)
  * Boston, MA 021110-1307, USA.
  */
 
+#include <linux/version.h>
 #include <linux/kthread.h>
 #include <linux/list.h>
 #include <linux/spinlock.h>
-#include <linux/freezer.h>
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)
+# include <linux/freezer.h>
+#else
+# include <linux/sched.h>
+#endif
+
 #include "async-thread.h"
 
 /*