Btrfs: fix RHEL test for ClearPageFsMisc
authorEric Sandeen <sandeen@redhat.com>
Thu, 7 Aug 2008 15:19:42 +0000 (11:19 -0400)
committerChris Mason <chris.mason@oracle.com>
Thu, 25 Sep 2008 15:04:06 +0000 (11:04 -0400)
Newer RHEL5 kernels define both ClearPageFSMisc and
ClearPageChecked, so test for both before redefining.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---

Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/ctree.h

index f90e5a7ac1611349341df2128c55ae04b4ec387f..c88f1e16ce2dd47d57af39dbdecf5f58d53b59ee 100644 (file)
@@ -1648,7 +1648,7 @@ int btrfs_csum_truncate(struct btrfs_trans_handle *trans,
 /* inode.c */
 
 /* RHEL and EL kernels have a patch that renames PG_checked to FsMisc */
-#ifdef ClearPageFsMisc
+#if defined(ClearPageFsMisc) && !defined(ClearPageChecked)
 #define ClearPageChecked ClearPageFsMisc
 #define SetPageChecked SetPageFsMisc
 #define PageChecked PageFsMisc