diff --git a/config/spl-build.m4 b/config/spl-build.m4
index 1a7512c96b..13c68358b1 100644
--- a/config/spl-build.m4
+++ b/config/spl-build.m4
@@ -79,6 +79,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [
 	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], [
@@ -1785,3 +1786,19 @@ AC_DEFUN([SPL_AC_SHRINK_ICACHE_MEMORY], [
 		[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])],
+		[])
+])
diff --git a/configure b/configure
index 6a322ce4ed..476100181e 100755
--- a/configure
+++ b/configure
@@ -15613,6 +15613,47 @@ _ACEOF
 	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)
 
@@ -19587,6 +19628,47 @@ _ACEOF
 
 
 
+	{ $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
diff --git a/include/linux/file_compat.h b/include/linux/file_compat.h
index 0bef014abe..97bd763961 100644
--- a/include/linux/file_compat.h
+++ b/include/linux/file_compat.h
@@ -67,5 +67,11 @@ spl_filp_open(const char *name, int flags, int mode, int *err)
 #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 */
 
diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c
index 1af9b29980..c46643175a 100644
--- a/module/spl/spl-vnode.c
+++ b/module/spl/spl-vnode.c
@@ -316,7 +316,7 @@ vn_remove(const char *path, uio_seg_t seg, int flags)
         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);
 
@@ -370,11 +370,11 @@ vn_rename(const char *oldname, const char *newname, int x1)
         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);
 
diff --git a/spl_config.h.in b/spl_config.h.in
index afa1535fac..7f084f5444 100644
--- a/spl_config.h.in
+++ b/spl_config.h.in
@@ -111,6 +111,9 @@
 /* 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