]> granicus.if.org Git - spl/commitdiff
Remove set_fs_pwd() configure check
authorBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 2 Oct 2014 16:47:09 +0000 (12:47 -0400)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 17 Oct 2014 22:11:51 +0000 (15:11 -0700)
This function has never been exported by any mainline and was only
briefly available under RHEL5.  Therefore this check is being removed
and the code update to always use the wrapper function.

The next step will be to eliminate all this code.  If ZFS were updated
not to assume that it's pwd was / there would be no need for this.

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

index 264989d5c1caf9cbf3dd54698bd4fef6824e3c29..dfa22aa85717b4b7eb476929df629a00e0a2e6b1 100644 (file)
@@ -28,7 +28,6 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [
        SPL_AC_PDE_DATA
        SPL_AC_MUTEX_OWNER
        SPL_AC_MUTEX_OWNER_TASK_STRUCT
-       SPL_AC_SET_FS_PWD
        SPL_AC_SET_FS_PWD_WITH_CONST
        SPL_AC_2ARGS_VFS_UNLINK
        SPL_AC_4ARGS_VFS_RENAME
@@ -972,24 +971,6 @@ AC_DEFUN([SPL_AC_PDE_DATA], [
        ])
 ])
 
-dnl #
-dnl # Symbol available in RHEL kernels not in stock kernels.
-dnl #
-AC_DEFUN([SPL_AC_SET_FS_PWD],
-       [AC_MSG_CHECKING([whether set_fs_pwd() is available])
-       SPL_LINUX_TRY_COMPILE_SYMBOL([
-               #include <linux/spinlock.h>
-               #include <linux/fs_struct.h>
-       ], [
-               (void) set_fs_pwd;
-       ], [set_fs_pwd], [], [
-               AC_MSG_RESULT(yes)
-               AC_DEFINE(HAVE_SET_FS_PWD, 1, [set_fs_pwd() is available])
-       ], [
-               AC_MSG_RESULT(no)
-       ])
-])
-
 dnl #
 dnl # 3.9 API change
 dnl # set_fs_pwd takes const struct path *
index 5b0dd423562f28090db571e154d40b5b12b2b2bb..63e5a39ef06739338b739ec1b08a7c6b7403cd7e 100644 (file)
@@ -766,34 +766,32 @@ vn_releasef(int fd)
 } /* releasef() */
 EXPORT_SYMBOL(releasef);
 
-#ifndef HAVE_SET_FS_PWD
-void
-#  ifdef HAVE_SET_FS_PWD_WITH_CONST
-set_fs_pwd(struct fs_struct *fs, const struct path *path)
-#  else
-set_fs_pwd(struct fs_struct *fs, struct path *path)
-#  endif
+static void
+#ifdef HAVE_SET_FS_PWD_WITH_CONST
+vn_set_fs_pwd(struct fs_struct *fs, const struct path *path)
+#else
+vn_set_fs_pwd(struct fs_struct *fs, struct path *path)
+#endif /* HAVE_SET_FS_PWD_WITH_CONST */
 {
        struct path old_pwd;
 
-#  ifdef HAVE_FS_STRUCT_SPINLOCK
+#ifdef HAVE_FS_STRUCT_SPINLOCK
        spin_lock(&fs->lock);
        old_pwd = fs->pwd;
        fs->pwd = *path;
        path_get(path);
        spin_unlock(&fs->lock);
-#  else
+#else
        write_lock(&fs->lock);
        old_pwd = fs->pwd;
        fs->pwd = *path;
        path_get(path);
        write_unlock(&fs->lock);
-#  endif /* HAVE_FS_STRUCT_SPINLOCK */
+#endif /* HAVE_FS_STRUCT_SPINLOCK */
 
        if (old_pwd.dentry)
                path_put(&old_pwd);
 }
-#endif /* HAVE_SET_FS_PWD */
 
 int
 vn_set_pwd(const char *filename)
@@ -819,7 +817,7 @@ vn_set_pwd(const char *filename)
         if (rc)
                 SGOTO(dput_and_out, rc);
 
-        set_fs_pwd(current->fs, &path);
+        vn_set_fs_pwd(current->fs, &path);
 
 dput_and_out:
         path_put(&path);