]> git.proxmox.com Git - mirror_spl.git/commitdiff
Remove kern_path() wrapper
authorBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 2 Oct 2014 18:48:23 +0000 (14:48 -0400)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 17 Oct 2014 22:11:52 +0000 (15:11 -0700)
The kern_path() function has been available since Linux 2.6.28.
There is no longer a need to maintain this compatibility code.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
config/spl-build.m4
module/spl/spl-vnode.c

index b30a6f581b834301df9c2cc9def6824be1b94286..6c34b99993977b3834f3c9e0783ebc99bc2dd385 100644 (file)
@@ -39,7 +39,6 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [
        SPL_AC_PUT_TASK_STRUCT
        SPL_AC_EXPORTED_RWSEM_IS_LOCKED
        SPL_AC_KERNEL_FALLOCATE
-       SPL_AC_KERN_PATH
        SPL_AC_CONFIG_ZLIB_INFLATE
        SPL_AC_CONFIG_ZLIB_DEFLATE
        SPL_AC_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE
@@ -1326,44 +1325,6 @@ AC_DEFUN([SPL_AC_EXPORTED_RWSEM_IS_LOCKED],
        ])
 ])
 
-dnl #
-dnl # 2.6.28 API change
-dnl # The kern_path() function has been introduced. We adopt it as the new way
-dnl # of looking up paths. When it is not available, we emulate it using the
-dnl # older interfaces.
-dnl #
-AC_DEFUN([SPL_AC_KERN_PATH],
-       [AC_MSG_CHECKING([whether kern_path() is available])
-       SPL_LINUX_TRY_COMPILE_SYMBOL([
-               #include <linux/namei.h>
-       ], [
-               int r = kern_path(NULL, 0, NULL);
-       ], [kern_path], [fs/namei.c], [
-               AC_MSG_RESULT(yes)
-               AC_DEFINE(HAVE_KERN_PATH, 1,
-                         [kern_path() is available])
-       ], [
-               AC_MSG_RESULT(no)
-               AC_MSG_CHECKING([whether path_lookup() is available])
-               SPL_LINUX_TRY_COMPILE_SYMBOL([
-                       #include <linux/namei.h>
-               ], [
-                       int r = path_lookup(NULL, 0, NULL);
-               ], [path_lookup], [fs/namei.c], [
-                       AC_MSG_RESULT(yes)
-                       AC_DEFINE(HAVE_KERN_PATH, 1,
-                                 [kern_path() is available])
-               ], [
-                       AC_MSG_RESULT(no)
-                       AC_MSG_ERROR([
-       *** Neither kern_path() nor path_lookup() is available.
-       *** Please file an issue:
-       *** https://github.com/zfsonlinux/spl/issues/new])
-
-               ])
-       ])
-])
-
 dnl #
 dnl # zlib inflate compat,
 dnl # Verify the kernel has CONFIG_ZLIB_INFLATE support enabled.
index 63e5a39ef06739338b739ec1b08a7c6b7403cd7e..b9f9d7b1fabcdcf2b5551803e01540aa12678a49 100644 (file)
@@ -296,22 +296,6 @@ vn_seek(vnode_t *vp, offset_t ooff, offset_t *noffp, void *ct)
 }
 EXPORT_SYMBOL(vn_seek);
 
-/*
- * kern_path() was introduced in Linux 2.6.28. We duplicate it as a
- * compatibility shim for earlier kernels.
- */
-#ifndef HAVE_KERN_PATH
-int
-kern_path(const char *name, unsigned int flags, struct path *path)
-{
-       struct nameidata nd;
-       int rc = path_lookup(name, flags, &nd);
-       if (!rc)
-               *path = nd.path;
-       return rc;
-}
-#endif /* HAVE_KERN_PATH */
-
 /*
  * spl_basename() takes a NULL-terminated string s as input containing a path.
  * It returns a char pointer to a string and a length that describe the