summaryrefslogtreecommitdiffstats
path: root/fs/cifs/netmisc.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2015-02-10 10:26:38 +0000
committerRussell King <rmk+kernel@arm.linux.org.uk>2015-02-10 10:26:38 +0000
commitdf9ab9771c64f5229843bfe2a20fe0ee6ac59fc1 (patch)
treea091be1024bd76627f78e791e377126e47703b7b /fs/cifs/netmisc.c
parented8f8ce38d0f7b505d7da2d79522972e962457c2 (diff)
parent4e1c0664de11e4b5861957ab4ddff2aeeffd042f (diff)
Merge branch 'devel-stable' into for-next
Diffstat (limited to 'fs/cifs/netmisc.c')
-rw-r--r--fs/cifs/netmisc.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/fs/cifs/netmisc.c b/fs/cifs/netmisc.c
index b333ff60781..abae6dd2c6b 100644
--- a/fs/cifs/netmisc.c
+++ b/fs/cifs/netmisc.c
@@ -926,6 +926,7 @@ cifs_NTtimeToUnix(__le64 ntutc)
/* Subtract the NTFS time offset, then convert to 1s intervals. */
s64 t = le64_to_cpu(ntutc) - NTFS_TIME_OFFSET;
+ u64 abs_t;
/*
* Unfortunately can not use normal 64 bit division on 32 bit arch, but
@@ -933,13 +934,14 @@ cifs_NTtimeToUnix(__le64 ntutc)
* to special case them
*/
if (t < 0) {
- t = -t;
- ts.tv_nsec = (long)(do_div(t, 10000000) * 100);
+ abs_t = -t;
+ ts.tv_nsec = (long)(do_div(abs_t, 10000000) * 100);
ts.tv_nsec = -ts.tv_nsec;
- ts.tv_sec = -t;
+ ts.tv_sec = -abs_t;
} else {
- ts.tv_nsec = (long)do_div(t, 10000000) * 100;
- ts.tv_sec = t;
+ abs_t = t;
+ ts.tv_nsec = (long)do_div(abs_t, 10000000) * 100;
+ ts.tv_sec = abs_t;
}
return ts;