From: Feng Sun Date: Tue, 19 Sep 2017 19:19:08 +0000 (+0800) Subject: misc: fix meaningless values X-Git-Tag: zfs-0.8.0-rc1~552 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=18a2485fc8061f7393ca19f7291366bc46fe9bf7;p=zfs misc: fix meaningless values Reviewed-by: George Melikov Reviewed-by: Brian Behlendorf Reviewed-by: Tim Chase Signed-off-by: Feng Sun Closes #6658 --- diff --git a/module/zfs/zfs_znode.c b/module/zfs/zfs_znode.c index e4115fef0..3caf1bdc1 100644 --- a/module/zfs/zfs_znode.c +++ b/module/zfs/zfs_znode.c @@ -1637,7 +1637,8 @@ zfs_trunc(znode_t *zp, uint64_t end) return (0); } - error = dmu_free_long_range(zfsvfs->z_os, zp->z_id, end, -1); + error = dmu_free_long_range(zfsvfs->z_os, zp->z_id, end, + DMU_OBJECT_END); if (error) { zfs_range_unlock(rl); return (error); diff --git a/module/zfs/zpl_file.c b/module/zfs/zpl_file.c index 4805abe69..4dfa0dea4 100644 --- a/module/zfs/zpl_file.c +++ b/module/zfs/zpl_file.c @@ -527,7 +527,7 @@ zpl_mmap(struct file *filp, struct vm_area_struct *vma) return (error); mutex_enter(&zp->z_lock); - zp->z_is_mapped = 1; + zp->z_is_mapped = B_TRUE; mutex_exit(&zp->z_lock); return (error);