]> err.no Git - linux-2.6/blobdiff - fs/cifs/netmisc.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/pci-2.6
[linux-2.6] / fs / cifs / netmisc.c
index 32562d19955209b267ee190aee47aaaa81709356..992e80edc720bb782cc13d5dcb1843691a240adf 100644 (file)
@@ -942,7 +942,7 @@ struct timespec cnvrtDosUnixTm(__u16 date, __u16 time)
                cERROR(1,("illegal date, month %d day: %d", month, days));
        month -= 1;
        days += total_days_of_prev_months[month];
-       days += 3653; /* account for difference in days between 1980 and 1970 */
+       days += 3652; /* account for difference in days between 1980 and 1970 */
        year = sd->Year;
        days += year * 365;
        days += (year/4); /* leap year */
@@ -956,7 +956,8 @@ struct timespec cnvrtDosUnixTm(__u16 date, __u16 time)
                days = days - 1;  /* do not count leap year for the year 2100 */
 
        /* adjust for leap year where we are still before leap day */
-       days -= ((year & 0x03) == 0) && (month < 2 ? 1 : 0);
+       if(year != 120)
+               days -= ((year & 0x03) == 0) && (month < 2 ? 1 : 0);
        sec += 24 * 60 * 60 * days; 
 
        ts.tv_sec = sec;