mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
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 <ryao@cs.stonybrook.edu> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Issue #784
This commit is contained in:
committed by
Brian Behlendorf
parent
756c3e5a9c
commit
ea1fdf46e2
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user