summaryrefslogtreecommitdiff
path: root/kerncompat.h
diff options
context:
space:
mode:
authorAndi Drebes <lists-receive@programmierforen.de>2010-09-09 10:57:02 +0800
committerChris Mason <chris.mason@oracle.com>2010-09-23 20:26:49 -0400
commit09559bfe7bcd43965bf8d3090f6f761fd785d093 (patch)
treeda275d9fd829ab883a6312fa43e3386351dbcb3a /kerncompat.h
parent075587c96c2f39e227847d13ca0ef305b13cd7d3 (diff)
multidevice support for check_mounted
Check_mount() should also work with multi device filesystems. This patch adds checks that allow to detect if a file is a device file used by a mounted single or multi device btrfs or if it is a regular file used by a loopback device that is part of a mounted single or multi device btrfs. The single device checks also work for non-btrfs filesystems. This might be helpful to prevent users from running btrfs programs (e.g. mkfs.btrfs) accidentally on a filesystem used somewhere else. Signed-off-by: Andi Drebes <lists-receive@programmierforen.de>
Diffstat (limited to 'kerncompat.h')
-rw-r--r--kerncompat.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/kerncompat.h b/kerncompat.h
index e4c8ce0c..46236cd5 100644
--- a/kerncompat.h
+++ b/kerncompat.h
@@ -42,7 +42,11 @@
#define GFP_NOFS 0
#define __read_mostly
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
+
+#ifndef ULONG_MAX
#define ULONG_MAX (~0UL)
+#endif
+
#define BUG() abort()
#ifdef __CHECKER__
#define __force __attribute__((force))