diff options
author | Richard Yao <[email protected]> | 2014-06-29 01:00:02 -0400 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2014-08-13 16:25:44 -0700 |
commit | ec18fe3ce8f27cfd86743f091d2d57e78dd8a5af (patch) | |
tree | 1f2714802668da9a29a795e094a6f23c7ec5c6f9 /include | |
parent | 2fc44f66ec9b83069593d87cf311069458c0d5ae (diff) |
Cleanup vn_rename() and vn_remove()
zfsonlinux/spl#bcb15891ab394e11615eee08bba1fd85ac32e158 implemented
Linux 3.6+ support by adding duplicate vn_rename and vn_remove
functions. The new ones were cleaner, but the duplicate functions made
the codebase less maintainable. This adds some compatibility shims that
allow us to retire the older vn_rename and vn_remove in favor of the new
ones on old kernels. The result is a net 143 line reduction in lines of
code and a cleaner codebase.
Signed-off-by: Richard Yao <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #370
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/file_compat.h | 18 | ||||
-rw-r--r-- | include/sys/vnode.h | 9 |
2 files changed, 0 insertions, 27 deletions
diff --git a/include/linux/file_compat.h b/include/linux/file_compat.h index 4588d6442..949d844e7 100644 --- a/include/linux/file_compat.h +++ b/include/linux/file_compat.h @@ -91,23 +91,5 @@ spl_filp_fallocate(struct file *fp, int mode, loff_t offset, loff_t len) #define spl_inode_unlock(ip) (up(&(ip)->i_sem)) #endif /* HAVE_INODE_I_MUTEX */ -#ifdef HAVE_KERN_PATH_PARENT_HEADER -# ifndef HAVE_KERN_PATH_PARENT_SYMBOL -typedef int (*kern_path_parent_t)(const char *, struct nameidata *); -extern kern_path_parent_t kern_path_parent_fn; -# define spl_kern_path_parent(path, nd) kern_path_parent_fn(path, nd) -# else -# define spl_kern_path_parent(path, nd) kern_path_parent(path, nd) -# endif /* HAVE_KERN_PATH_PARENT_SYMBOL */ -#else -# define spl_kern_path_parent(path, nd) path_lookup(path, LOOKUP_PARENT, nd) -#endif /* HAVE_KERN_PATH_PARENT_HEADER */ - -#ifdef HAVE_KERN_PATH_LOCKED -typedef struct dentry * (*kern_path_locked_t)(const char *, struct path *); -extern kern_path_locked_t kern_path_locked_fn; -# define spl_kern_path_locked(name, path) kern_path_locked_fn(name, path) -#endif /* HAVE_KERN_PATH_LOCKED */ - #endif /* SPL_FILE_COMPAT_H */ diff --git a/include/sys/vnode.h b/include/sys/vnode.h index 35607e1ea..07a344938 100644 --- a/include/sys/vnode.h +++ b/include/sys/vnode.h @@ -103,14 +103,6 @@ #define CREATE_XATTR_DIR 0x04 #define ATTR_NOACLCHECK 0x20 -#ifdef HAVE_PATH_IN_NAMEIDATA -# define nd_dentry path.dentry -# define nd_mnt path.mnt -#else -# define nd_dentry dentry -# define nd_mnt mnt -#endif - typedef enum vtype { VNON = 0, VREG = 1, @@ -194,7 +186,6 @@ extern file_t *vn_getf(int fd); extern void vn_releasef(int fd); extern int vn_set_pwd(const char *filename); -int spl_vn_init_kallsyms_lookup(void); int spl_vn_init(void); void spl_vn_fini(void); |