SPL_AC_KERNEL_2ARGS_INVALIDATE_INODES
SPL_AC_SHRINK_DCACHE_MEMORY
SPL_AC_SHRINK_ICACHE_MEMORY
+ SPL_AC_KERN_PATH_PARENT
])
AC_DEFUN([SPL_AC_MODULE_SYMVERS], [
[shrink_icache_memory() is available])],
[])
])
+
+dnl #
+dnl # 2.6.39 API compat,
+dnl # The path_lookup() function has been renamed to kern_path_parent()
+dnl # and the flags argument has been removed. The only behavior now
+dnl # offered is that of LOOKUP_PARENT. The spl already always passed
+dnl # this flag so dropping the flag does not impact us.
+dnl #
+AC_DEFUN([SPL_AC_KERN_PATH_PARENT], [
+ SPL_CHECK_SYMBOL_EXPORT(
+ [kern_path_parent],
+ [fs/namei.c],
+ [AC_DEFINE(HAVE_KERN_PATH_PARENT, 1,
+ [kern_path_parent() is available])],
+ [])
+])
fi
+
+ { $as_echo "$as_me:$LINENO: checking whether symbol kern_path_parent is exported" >&5
+$as_echo_n "checking whether symbol kern_path_parent is exported... " >&6; }
+ grep -q -E '[[:space:]]kern_path_parent[[:space:]]' \
+ $LINUX_OBJ/Module*.symvers 2>/dev/null
+ rc=$?
+ if test $rc -ne 0; then
+ export=0
+ for file in fs/namei.c; do
+ grep -q -E "EXPORT_SYMBOL.*(kern_path_parent)" \
+ "$LINUX_OBJ/$file" 2>/dev/null
+ rc=$?
+ if test $rc -eq 0; then
+ export=1
+ break;
+ fi
+ done
+ if test $export -eq 0; then
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+ else
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_KERN_PATH_PARENT 1
+_ACEOF
+
+ fi
+ else
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_KERN_PATH_PARENT 1
+_ACEOF
+
+ fi
+
+
;;
user)
+ { $as_echo "$as_me:$LINENO: checking whether symbol kern_path_parent is exported" >&5
+$as_echo_n "checking whether symbol kern_path_parent is exported... " >&6; }
+ grep -q -E '[[:space:]]kern_path_parent[[:space:]]' \
+ $LINUX_OBJ/Module*.symvers 2>/dev/null
+ rc=$?
+ if test $rc -ne 0; then
+ export=0
+ for file in fs/namei.c; do
+ grep -q -E "EXPORT_SYMBOL.*(kern_path_parent)" \
+ "$LINUX_OBJ/$file" 2>/dev/null
+ rc=$?
+ if test $rc -eq 0; then
+ export=1
+ break;
+ fi
+ done
+ if test $export -eq 0; then
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
+ else
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_KERN_PATH_PARENT 1
+_ACEOF
+
+ fi
+ else
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_KERN_PATH_PARENT 1
+_ACEOF
+
+ fi
+
+
+
if test "x$AWK" != xgawk; then
#define spl_inode_unlock(ip) (up(&(ip)->i_sem))
#endif /* HAVE_INODE_I_MUTEX */
+#ifdef HAVE_KERN_PATH_PARENT
+#define spl_kern_path_parent(path, nd) kern_path_parent(path, nd)
+#else
+#define spl_kern_path_parent(path, nd) path_lookup(path, LOOKUP_PARENT, nd)
+#endif /* HAVE_KERN_PATH_PARENT */
+
#endif /* SPL_FILE_COMPAT_H */
ASSERT(seg == UIO_SYSSPACE);
ASSERT(flags == RMFILE);
- rc = path_lookup(path, LOOKUP_PARENT, &nd);
+ rc = spl_kern_path_parent(path, &nd);
if (rc)
SGOTO(exit, rc);
int rc = 0;
SENTRY;
- rc = path_lookup(oldname, LOOKUP_PARENT, &oldnd);
+ rc = spl_kern_path_parent(oldname, &oldnd);
if (rc)
SGOTO(exit, rc);
- rc = path_lookup(newname, LOOKUP_PARENT, &newnd);
+ rc = spl_kern_path_parent(newname, &newnd);
if (rc)
SGOTO(exit1, rc);
/* kallsyms_lookup_name() is available */
#undef HAVE_KALLSYMS_LOOKUP_NAME
+/* kern_path_parent() is available */
+#undef HAVE_KERN_PATH_PARENT
+
/* kmalloc_node() is available */
#undef HAVE_KMALLOC_NODE