Whamcloud - gitweb
LU-8210 osd-ldiskfs: fix setting pages PageUptodate state
[fs/lustre-release.git] / lustre / include / lustre_compat.h
index 4e9f3ac..d777993 100644 (file)
@@ -39,6 +39,7 @@
 
 #include <linux/fs_struct.h>
 #include <linux/namei.h>
+#include <linux/bio.h>
 
 #include <lustre_patchless_compat.h>
 
@@ -409,4 +410,8 @@ static inline void truncate_inode_pages_final(struct address_space *map)
         security_inode_init_security(inode, dir, name, value, len)
 #endif
 
+#ifndef bio_for_each_segment_all /* since kernel version 3.9 */
+#define bio_for_each_segment_all(bv, bio, it) bio_for_each_segment(bv, bio, it)
+#endif
+
 #endif /* _LUSTRE_COMPAT_H */