aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/netmisc.c
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2006-10-11 18:49:24 +0000
committerSteve French <sfrench@us.ibm.com>2006-10-11 18:49:24 +0000
commit70903ca004fef17b0f6483714baefdb2f6ecceb0 (patch)
treea54857b395c8e440f42ba917c4cfdb25bd845efb /fs/cifs/netmisc.c
parent[CIFS] Fix leaps year calculation for years after 2100 (diff)
downloadlinux-dev-70903ca004fef17b0f6483714baefdb2f6ecceb0.tar.xz
linux-dev-70903ca004fef17b0f6483714baefdb2f6ecceb0.zip
[CIFS] Do not need to adjust for Jan/Feb for leap day
calculation in 2100 (year divisible by 100) Signed-off-by: Yehuda Sadeh Weinraub <Yehuda.Sadeh@expand.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/netmisc.c')
-rw-r--r--fs/cifs/netmisc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/cifs/netmisc.c b/fs/cifs/netmisc.c
index 32562d199552..3adbd128e08e 100644
--- a/fs/cifs/netmisc.c
+++ b/fs/cifs/netmisc.c
@@ -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;