diff options
author | Brian Behlendorf <[email protected]> | 2009-05-20 10:56:13 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2009-05-20 11:00:39 -0700 |
commit | 6c9433c150ad12d01f7ea4cfc72c8647a08ac5fc (patch) | |
tree | 974117fb5da01c2db1a8cee99a94e1cc59fdaa8a /include | |
parent | 96dded38442684319305082aa2ac7e25f7f414da (diff) |
SLES10 Fixes (part 3):
- Configure check for mutex_lock_nested(). This function was introduced
as part of the mutex validator in 2.6.18, but if it's unavailable then
it's safe to fallback to a plain mutex_lock().
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/mutex_compat.h | 12 | ||||
-rw-r--r-- | include/sys/types.h | 1 |
2 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/mutex_compat.h b/include/linux/mutex_compat.h new file mode 100644 index 000000000..49072405e --- /dev/null +++ b/include/linux/mutex_compat.h @@ -0,0 +1,12 @@ +#ifndef _SPL_MUTEX_COMPAT_H +#define _SPL_MUTEX_COMPAT_H + +#include <linux/mutex.h> + +/* mutex_lock_nested() introduced in 2.6.18 */ +#ifndef HAVE_MUTEX_LOCK_NESTED +# define mutex_lock_nested(lock, subclass) mutex_lock(lock) +#endif /* HAVE_MUTEX_LOCK_NESTED */ + +#endif /* _SPL_MUTEX_COMPAT_H */ + diff --git a/include/sys/types.h b/include/sys/types.h index 5fd3a9376..252def7bd 100644 --- a/include/sys/types.h +++ b/include/sys/types.h @@ -17,6 +17,7 @@ extern "C" { #include <linux/smp_compat.h> #include <linux/workqueue_compat.h> #include <linux/kallsyms_compat.h> +#include <linux/mutex_compat.h> #ifndef HAVE_UINTPTR_T typedef unsigned long uintptr_t; |