diff options
Diffstat (limited to 'module')
-rw-r--r-- | module/zfs/zfs_vnops.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/module/zfs/zfs_vnops.c b/module/zfs/zfs_vnops.c index 5b47cba7f..86bef25fb 100644 --- a/module/zfs/zfs_vnops.c +++ b/module/zfs/zfs_vnops.c @@ -72,6 +72,7 @@ #include <sys/kidmap.h> #include <sys/cred.h> #include <sys/attr.h> +#include <sys/zpl.h> /* * Programming rules. @@ -2433,6 +2434,8 @@ top: if (err) goto out3; + truncate_setsize(ip, vap->va_size); + /* * XXX - Note, we are not providing any open * mode flags here (like FNDELAY), so we may @@ -2443,11 +2446,6 @@ top: err = zfs_freesp(zp, vap->va_size, 0, 0, FALSE); if (err) goto out3; - - /* Careful negative Linux return code here */ - err = -vmtruncate(ip, vap->va_size); - if (err) - goto out3; } if (mask & (ATTR_ATIME|ATTR_MTIME) || |