diff options
author | Chunwei Chen <[email protected]> | 2014-05-07 10:54:37 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2014-05-07 13:38:17 -0700 |
commit | ad3412efd7cc2debb0f9f354d3f5e105a99d97e1 (patch) | |
tree | 31a9be5222a01b064db190550fbb65ab730fc49e /module | |
parent | 1538f4b6e3cc08c334f58b0025aa7de1d6c97e1a (diff) |
Linux 3.15: vfs_rename() added a flags argument
Detect the updated vfs_rename() interface and call it with an
extra flags argument.
References:
torvalds/linux@520c8b1
Signed-off-by: Chunwei Chen <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Issue #355
Diffstat (limited to 'module')
-rw-r--r-- | module/spl/spl-vnode.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c index 549606770..fa3e49054 100644 --- a/module/spl/spl-vnode.c +++ b/module/spl/spl-vnode.c @@ -414,13 +414,16 @@ vn_rename(const char *oldname, const char *newname, int x1) SGOTO(exit4, rc); } -#ifdef HAVE_4ARGS_VFS_RENAME +#if defined(HAVE_4ARGS_VFS_RENAME) rc = vfs_rename(old_dir->d_inode, old_dentry, new_dir->d_inode, new_dentry); -#else +#elif defined(HAVE_5ARGS_VFS_RENAME) rc = vfs_rename(old_dir->d_inode, old_dentry, new_dir->d_inode, new_dentry, NULL); -#endif /* HAVE_4ARGS_VFS_RENAME */ +#else + rc = vfs_rename(old_dir->d_inode, old_dentry, + new_dir->d_inode, new_dentry, NULL, 0); +#endif exit4: unlock_rename(new_dir, old_dir); exit3: @@ -574,13 +577,16 @@ vn_rename(const char *oldname, const char *newname, int x1) if (new_dentry == trap) SGOTO(exit5, rc); -#ifdef HAVE_4ARGS_VFS_RENAME +#if defined(HAVE_4ARGS_VFS_RENAME) rc = vfs_rename(old_dir->d_inode, old_dentry, new_dir->d_inode, new_dentry); -#else +#elif defined(HAVE_5ARGS_VFS_RENAME) rc = vfs_rename(old_dir->d_inode, old_dentry, new_dir->d_inode, new_dentry, NULL); -#endif /* HAVE_4ARGS_VFS_RENAME */ +#else + rc = vfs_rename(old_dir->d_inode, old_dentry, + new_dir->d_inode, new_dentry, NULL, 0); +#endif exit5: dput(new_dentry); exit4: |