Print this page
7122 fix negative timestamps with nsec == 0 in nfs4_time_ntov()

@@ -493,11 +493,11 @@
 
         /* Invalid to specify 1 billion (or more) nsecs */
         if (ntime->nseconds >= 1000000000)
                 return (EINVAL);
 
-        if (ntime->seconds < 0) {
+        if (ntime->seconds < 0 && ntime->nseconds != 0) {
                 sec = ntime->seconds + 1;
                 nsec = -1000000000 + ntime->nseconds;
         } else {
                 sec = ntime->seconds;
                 nsec = ntime->nseconds;