]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/btrfs/compat.h
Btrfs: Change TestSetPageLocked() to trylock_page()
[linux-2.6-omap-h63xx.git] / fs / btrfs / compat.h
index d39a768e65ff17c598c8c7801a204fe534b7585c..b3349a66999d20762b407d9dc853cdda908cac74 100644 (file)
@@ -1,6 +1,9 @@
 #ifndef _COMPAT_H_
 #define _COMPAT_H_
 
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,26)
+#define trylock_page(page) (!TestSetPageLocked(page))
+#endif
 
 /*
  * Even if AppArmor isn't enabled, it still has different prototypes.