Pārlūkot izejas kodu

Btrfs: Add backport for the kthread work on kernels older than 2.6.20

Signed-off-by: Chris Mason <chris.mason@oracle.com>
Chris Mason 17 gadi atpakaļ
vecāks
revīzija
d05e5a4dad
1 mainītis faili ar 8 papildinājumiem un 1 dzēšanām
  1. 8 1
      fs/btrfs/async-thread.c

+ 8 - 1
fs/btrfs/async-thread.c

@@ -16,10 +16,17 @@
  * Boston, MA 021110-1307, USA.
  * Boston, MA 021110-1307, USA.
  */
  */
 
 
+#include <linux/version.h>
 #include <linux/kthread.h>
 #include <linux/kthread.h>
 #include <linux/list.h>
 #include <linux/list.h>
 #include <linux/spinlock.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"
 #include "async-thread.h"
 
 
 /*
 /*