summaryrefslogtreecommitdiffstats
path: root/module/zfs/zpl_inode.c
diff options
context:
space:
mode:
authorRichard Yao <[email protected]>2012-07-23 11:11:25 -0700
committerBrian Behlendorf <[email protected]>2012-07-23 12:29:32 -0700
commitea1fdf46e2d37e9eb048f9add0fb06e77e9ee6e2 (patch)
treebe21fa4bb6f934868c4ffe29a48eba6dcbe71613 /module/zfs/zpl_inode.c
parent756c3e5a9ce36461939a8dc421918e1c3a379fa6 (diff)
Linux 3.5 compat, iops->truncate_range() removed
The vmtruncate_range() support has been removed from the kernel in favor of using the fallocate method in the file_operations table. Signed-off-by: Richard Yao <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Issue #784
Diffstat (limited to 'module/zfs/zpl_inode.c')
-rw-r--r--module/zfs/zpl_inode.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/module/zfs/zpl_inode.c b/module/zfs/zpl_inode.c
index ea8c309ac..0dab82cc0 100644
--- a/module/zfs/zpl_inode.c
+++ b/module/zfs/zpl_inode.c
@@ -328,6 +328,7 @@ out:
return (error);
}
+#ifdef HAVE_INODE_TRUNCATE_RANGE
static void
zpl_truncate_range(struct inode* ip, loff_t start, loff_t end)
{
@@ -354,6 +355,7 @@ zpl_truncate_range(struct inode* ip, loff_t start, loff_t end)
crfree(cr);
}
+#endif /* HAVE_INODE_TRUNCATE_RANGE */
#ifdef HAVE_INODE_FALLOCATE
static long
@@ -379,7 +381,9 @@ const struct inode_operations zpl_inode_operations = {
.getxattr = generic_getxattr,
.removexattr = generic_removexattr,
.listxattr = zpl_xattr_list,
+#ifdef HAVE_INODE_TRUNCATE_RANGE
.truncate_range = zpl_truncate_range,
+#endif /* HAVE_INODE_TRUNCATE_RANGE */
#ifdef HAVE_INODE_FALLOCATE
.fallocate = zpl_fallocate,
#endif /* HAVE_INODE_FALLOCATE */