summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2014-10-01 20:14:15 -0400
committerBrian Behlendorf <[email protected]>2014-10-17 15:11:51 -0700
commit3c49a1698986861d76dc2c08dcce8774bde36e25 (patch)
treefe1ea42f2a7ff9a6a9f97b1e21f3c4208ed7c359 /module
parent44778f41100f88e7458d4deb2335ad09ce0bd0ea (diff)
Remove user_path_dir() wrapper
The user_path_dir() function has been available since Linux 2.6.27. There is no longer a need to maintain this compatibility code. Signed-off-by: Brian Behlendorf <[email protected]>
Diffstat (limited to 'module')
-rw-r--r--module/spl/spl-vnode.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c
index a8c5f974d..5b0dd4235 100644
--- a/module/spl/spl-vnode.c
+++ b/module/spl/spl-vnode.c
@@ -798,11 +798,7 @@ set_fs_pwd(struct fs_struct *fs, struct path *path)
int
vn_set_pwd(const char *filename)
{
-#ifdef HAVE_USER_PATH_DIR
struct path path;
-#else
- struct nameidata nd;
-#endif /* HAVE_USER_PATH_DIR */
mm_segment_t saved_fs;
int rc;
SENTRY;
@@ -815,7 +811,6 @@ vn_set_pwd(const char *filename)
saved_fs = get_fs();
set_fs(get_ds());
-# ifdef HAVE_USER_PATH_DIR
rc = user_path_dir(filename, &path);
if (rc)
SGOTO(out, rc);
@@ -828,21 +823,6 @@ vn_set_pwd(const char *filename)
dput_and_out:
path_put(&path);
-# else
- rc = __user_walk(filename,
- LOOKUP_FOLLOW|LOOKUP_DIRECTORY|LOOKUP_CHDIR, &nd);
- if (rc)
- SGOTO(out, rc);
-
- rc = vfs_permission(&nd, MAY_EXEC);
- if (rc)
- SGOTO(dput_and_out, rc);
-
- set_fs_pwd(current->fs, &nd.path);
-
-dput_and_out:
- path_put(&nd.path);
-# endif /* HAVE_USER_PATH_DIR */
out:
set_fs(saved_fs);