+# LB_LDISKFS_FIND_ENTRY_LOCKED_EXISTS
+#
+# kernel 5.2 commit 8a363970d1dc38c4ec4ad575c862f776f468d057
+# ext4: avoid declaring fs inconsistent due to invalid file handles
+# __ext4_find_entry became a helper function for ext4_find_entry
+# conflicting with previous ldiskfs patches.
+# ldiskfs patches map ext4_find_entry to ldiskfs_find_entry_locked to
+# avoid conflicting with __ext4_find_entry
+#
+# When the following check succeeds __ext4_find_entry helper is not
+# used.
+#
+AC_DEFUN([LB_LDISKFS_FIND_ENTRY_LOCKED_EXISTS], [
+tmp_flags="$EXTRA_KCFLAGS"
+EXTRA_KCFLAGS="-Werror"
+LB_CHECK_COMPILE([if __ldiskfs_find_entry is available],
+ldiskfs_find_entry_locked, [
+ #include <linux/fs.h>
+ #include "$EXT4_SRC_DIR/ext4.h"
+ #include "$EXT4_SRC_DIR/namei.c"
+
+ static int __ext4_find_entry(void) { return 0; }
+],[
+ int x = __ext4_find_entry();
+ (void)x;
+],[
+ AC_DEFINE(HAVE___LDISKFS_FIND_ENTRY, 1,
+ [if __ldiskfs_find_entry is available])
+])
+EXTRA_KCFLAGS="$tmp_flags"
+]) # LB_LDISKFS_FIND_ENTRY_LOCKED_EXISTS
+
+#
+# LB_LDISKFSFS_DIRHASH_WANTS_DIR