mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
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 <ryao@gentoo.org> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #370
This commit is contained in:
committed by
Brian Behlendorf
parent
2fc44f66ec
commit
ec18fe3ce8
@@ -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 */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user