Remove vfs_fsync() wrapper

The vfs_fsync() function has been available since Linux 2.6.29.
There is no longer a need to maintain this compatibility code.
However, the HAVE_2ARGS_VFS_FSYNC check was left in place
since that change occured after 2.6.32.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
This commit is contained in:
Brian Behlendorf
2014-10-02 14:52:47 -04:00
parent 599662c538
commit dcf91382b9
2 changed files with 6 additions and 30 deletions
+6 -11
View File
@@ -59,27 +59,22 @@ spl_filp_fallocate(struct file *fp, int mode, loff_t offset, loff_t len)
if (fp->f_op->fallocate)
error = fp->f_op->fallocate(fp, mode, offset, len);
#else
# ifdef HAVE_INODE_FALLOCATE
#ifdef HAVE_INODE_FALLOCATE
if (fp->f_dentry && fp->f_dentry->d_inode &&
fp->f_dentry->d_inode->i_op->fallocate)
error = fp->f_dentry->d_inode->i_op->fallocate(
fp->f_dentry->d_inode, mode, offset, len);
# endif /* HAVE_INODE_FALLOCATE */
#endif /* HAVE_INODE_FALLOCATE */
#endif /*HAVE_FILE_FALLOCATE */
return (error);
}
#ifdef HAVE_VFS_FSYNC
# ifdef HAVE_2ARGS_VFS_FSYNC
# define spl_filp_fsync(fp, sync) vfs_fsync(fp, sync)
# else
# define spl_filp_fsync(fp, sync) vfs_fsync(fp, (fp)->f_dentry, sync)
# endif /* HAVE_2ARGS_VFS_FSYNC */
#ifdef HAVE_2ARGS_VFS_FSYNC
#define spl_filp_fsync(fp, sync) vfs_fsync(fp, sync)
#else
# include <linux/buffer_head.h>
# define spl_filp_fsync(fp, sync) file_fsync(fp, (fp)->f_dentry, sync)
#endif /* HAVE_VFS_FSYNC */
#define spl_filp_fsync(fp, sync) vfs_fsync(fp, (fp)->f_dentry, sync)
#endif /* HAVE_2ARGS_VFS_FSYNC */
#define spl_inode_lock(ip) mutex_lock(&(ip)->i_mutex)
#define spl_inode_unlock(ip) mutex_unlock(&(ip)->i_mutex)