Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
LU-8066 obd: final pieces for sysfs/debugfs support.
[fs/lustre-release.git]
/
lustre
/
include
/
lustre_compat.h
diff --git
a/lustre/include/lustre_compat.h
b/lustre/include/lustre_compat.h
index
4a3a0cf
..
37cca5a
100644
(file)
--- a/
lustre/include/lustre_compat.h
+++ b/
lustre/include/lustre_compat.h
@@
-392,6
+392,16
@@
static inline void truncate_inode_pages_final(struct address_space *map)
}
#endif
+#ifndef HAVE_PTR_ERR_OR_ZERO
+static inline int __must_check PTR_ERR_OR_ZERO(__force const void *ptr)
+{
+ if (IS_ERR(ptr))
+ return PTR_ERR(ptr);
+ else
+ return 0;
+}
+#endif
+
#ifndef SIZE_MAX
#define SIZE_MAX (~(size_t)0)
#endif