Print this page
OS-5148 ftruncate at offset should emit proper events
Reviewed by: Bryan Cantrill <bryan@joyent.com>
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>

@@ -779,13 +779,16 @@
                 error = pc_truncate(pcp, (uint_t)vap->va_size);
 
                 if (error)
                         goto out;
 
-                if (vap->va_size == 0)
+                if (vap->va_size == 0) {
                         vnevent_truncate(vp, ct);
+                } else {
+                        vnevent_resize(vp, ct);
         }
+        }
         /*
          * Change file modified times.
          */
         if (mask & (AT_MTIME | AT_CTIME)) {
                 /*