X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=module%2Fzfs%2Fzpl_inode.c;h=0dab82cc0917ebd20e9fe6df0f7d9b316257a915;hb=991fc1d7ae2589c01a939a9cbd0e866c90fdd03b;hp=1f6169b755fd1a2dc406926672a2008304389571;hpb=b39d3b9f7be925ba9314c336099f31f508e1d940;p=zfs.git diff --git a/module/zfs/zpl_inode.c b/module/zfs/zpl_inode.c index 1f6169b..0dab82c 100644 --- a/module/zfs/zpl_inode.c +++ b/module/zfs/zpl_inode.c @@ -294,9 +294,8 @@ zpl_follow_link(struct dentry *dentry, struct nameidata *nd) static void zpl_put_link(struct dentry *dentry, struct nameidata *nd, void *ptr) { - char *link; + const char *link = nd_get_link(nd); - link = nd_get_link(nd); if (!IS_ERR(link)) kmem_free(link, MAXPATHLEN); } @@ -329,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) { @@ -355,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 @@ -380,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 */