aboutsummaryrefslogtreecommitdiffstats
path: root/module/spl/spl-vnode.c
diff options
context:
space:
mode:
authorRichard Yao <[email protected]>2013-11-25 11:22:33 -0500
committerBrian Behlendorf <[email protected]>2013-12-02 10:37:49 -0800
commit50a0749eba31e821a7edf286f1e3b149f7d13c59 (patch)
tree46c33d5514b1f9d10d3f62fc1386dde95a5cfe58 /module/spl/spl-vnode.c
parent3e96de17d723d6f6c9e2fd04b059b50d4e0bbef0 (diff)
Linux 3.13 compat: Pass NULL for new delegated inode argument
This check was originally added for SLES10, a093c6a, to check for a 'struct vfsmount *' argument which they added. However, since SLES10 is based on a 2.6.16 kernel which is no longer supported this functionality was dropped. The checks were refactored to support Linux 3.13 without concern for historical versions. Signed-off-by: Richard Yao <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #312
Diffstat (limited to 'module/spl/spl-vnode.c')
-rw-r--r--module/spl/spl-vnode.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c
index 0784ff261..549606770 100644
--- a/module/spl/spl-vnode.c
+++ b/module/spl/spl-vnode.c
@@ -334,7 +334,11 @@ vn_remove(const char *path, uio_seg_t seg, int flags)
if (inode)
ihold(inode);
+#ifdef HAVE_2ARGS_VFS_UNLINK
rc = vfs_unlink(parent.dentry->d_inode, dentry);
+#else
+ rc = vfs_unlink(parent.dentry->d_inode, dentry, NULL);
+#endif /* HAVE_2ARGS_VFS_UNLINK */
exit1:
dput(dentry);
} else {
@@ -412,10 +416,10 @@ vn_rename(const char *oldname, const char *newname, int x1)
#ifdef HAVE_4ARGS_VFS_RENAME
rc = vfs_rename(old_dir->d_inode, old_dentry,
- new_dir->d_inode, new_dentry);
+ new_dir->d_inode, new_dentry);
#else
- rc = vfs_rename(old_dir->d_inode, old_dentry, oldnd.nd_mnt,
- new_dir->d_inode, new_dentry, newnd.nd_mnt);
+ rc = vfs_rename(old_dir->d_inode, old_dentry,
+ new_dir->d_inode, new_dentry, NULL);
#endif /* HAVE_4ARGS_VFS_RENAME */
exit4:
unlock_rename(new_dir, old_dir);
@@ -478,9 +482,9 @@ vn_remove(const char *path, uio_seg_t seg, int flags)
if (inode)
atomic_inc(&inode->i_count);
#ifdef HAVE_2ARGS_VFS_UNLINK
- rc = vfs_unlink(nd.nd_dentry->d_inode, dentry);
+ rc = vfs_unlink(nd.nd_dentry->d_inode, dentry);
#else
- rc = vfs_unlink(nd.nd_dentry->d_inode, dentry, nd.nd_mnt);
+ rc = vfs_unlink(nd.nd_dentry->d_inode, dentry, NULL);
#endif /* HAVE_2ARGS_VFS_UNLINK */
exit2:
dput(dentry);
@@ -571,11 +575,11 @@ vn_rename(const char *oldname, const char *newname, int x1)
SGOTO(exit5, rc);
#ifdef HAVE_4ARGS_VFS_RENAME
- rc = vfs_rename(old_dir->d_inode, old_dentry,
- new_dir->d_inode, new_dentry);
+ rc = vfs_rename(old_dir->d_inode, old_dentry,
+ new_dir->d_inode, new_dentry);
#else
- rc = vfs_rename(old_dir->d_inode, old_dentry, oldnd.nd_mnt,
- new_dir->d_inode, new_dentry, newnd.nd_mnt);
+ rc = vfs_rename(old_dir->d_inode, old_dentry,
+ new_dir->d_inode, new_dentry, NULL);
#endif /* HAVE_4ARGS_VFS_RENAME */
exit5:
dput(new_dentry);