]> granicus.if.org Git - zfs/commitdiff
misc: fix meaningless values
authorFeng Sun <loyou85@gmail.com>
Tue, 19 Sep 2017 19:19:08 +0000 (03:19 +0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 19 Sep 2017 19:19:08 +0000 (12:19 -0700)
Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tim Chase <tim@chase2k.com>
Signed-off-by: Feng Sun <loyou85@gmail.com>
Closes #6658

module/zfs/zfs_znode.c
module/zfs/zpl_file.c

index e4115fef089aab4515785bcef3319ffb72a08409..3caf1bdc1799e2b38b251c71ddb4966ed6bec25a 100644 (file)
@@ -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);
index 4805abe695f265154cd00f7323dcc82848c85086..4dfa0dea43583f892129a45e14343c0c005ea057 100644 (file)
@@ -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);