X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=module%2Fzfs%2Fzpl_inode.c;h=9b5533755985845b5d6cbf3f7c5204ee2965111a;hb=cb2d19010d8fbcf6c22585cd8763fad3ba7db724;hp=2d197a4880722a197a6cb1bb9c208982b37cc4e4;hpb=5cb63a57f8d2d1a94e65b4710bfbb221b1a71700;p=zfs.git diff --git a/module/zfs/zpl_inode.c b/module/zfs/zpl_inode.c index 2d197a4..9b55337 100644 --- a/module/zfs/zpl_inode.c +++ b/module/zfs/zpl_inode.c @@ -342,6 +342,15 @@ zpl_truncate_range(struct inode* ip, loff_t start, loff_t end) crfree(cr); } +#ifdef HAVE_INODE_FALLOCATE +static long +zpl_fallocate(struct inode *ip, int mode, loff_t offset, loff_t len) +{ + return zpl_fallocate_common(ip, mode, offset, len); +} +#endif /* HAVE_INODE_FALLOCATE */ + + const struct inode_operations zpl_inode_operations = { .create = zpl_create, .link = zpl_link, @@ -358,6 +367,9 @@ const struct inode_operations zpl_inode_operations = { .removexattr = generic_removexattr, .listxattr = zpl_xattr_list, .truncate_range = zpl_truncate_range, +#ifdef HAVE_INODE_FALLOCATE + .fallocate = zpl_fallocate, +#endif /* HAVE_INODE_FALLOCATE */ }; const struct inode_operations zpl_dir_inode_operations = {