From fe0c9f409a1914ad5e5ea5b7cf14a8991e6c1126 Mon Sep 17 00:00:00 2001 From: Tomohiro Kusumi Date: Thu, 30 May 2019 08:18:14 +0900 Subject: Remove vn_set_fs_pwd()/vn_set_pwd() (no need to be at / during insmod) Per suggestion from @behlendorf in #8777, remove vn_set_fs_pwd() and vn_set_pwd() which are only used in zfs_ioctl.c:_init() while loading zfs.ko. The rest of initialization functions being called here after cwd set to / don't depend on cwd of the process except for spa_config_load(). spa_config_load() uses a relative path ".//etc/zfs/zpool.cache" when `rootdir` is non-NULL, which is "/etc/zfs/zpool.cache" given cwd is /, so just unconditionally use the absolute path without "./", so that `vn_set_pwd("/")` as well as the entire functions can be removed. This is also what FreeBSD does. Reviewed-by: Brian Behlendorf Reviewed-by: Tony Hutter Signed-off-by: Tomohiro Kusumi Closes #8826 --- include/spl/sys/vnode.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include') diff --git a/include/spl/sys/vnode.h b/include/spl/sys/vnode.h index 71278b08c..7bd278e4e 100644 --- a/include/spl/sys/vnode.h +++ b/include/spl/sys/vnode.h @@ -182,7 +182,6 @@ extern int vn_space(vnode_t *vp, int cmd, struct flock *bfp, int flag, extern file_t *vn_getf(int fd); extern void vn_releasef(int fd); extern void vn_areleasef(int fd, uf_info_t *fip); -extern int vn_set_pwd(const char *filename); int spl_vn_init(void); void spl_vn_fini(void); -- cgit v1.2.3