diff options
Diffstat (limited to 'fs/cifs/netmisc.c')
-rw-r--r-- | fs/cifs/netmisc.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/cifs/netmisc.c b/fs/cifs/netmisc.c index e2fe998989a3..d3ba75ef014f 100644 --- a/fs/cifs/netmisc.c +++ b/fs/cifs/netmisc.c | |||
@@ -853,12 +853,12 @@ smbCalcSize_LE(struct smb_hdr *ptr) | |||
853 | 853 | ||
854 | #define NTFS_TIME_OFFSET ((u64)(369*365 + 89) * 24 * 3600 * 10000000) | 854 | #define NTFS_TIME_OFFSET ((u64)(369*365 + 89) * 24 * 3600 * 10000000) |
855 | 855 | ||
856 | /* | 856 | /* |
857 | * Convert the NT UTC (based 1601-01-01, in hundred nanosecond units) | 857 | * Convert the NT UTC (based 1601-01-01, in hundred nanosecond units) |
858 | * into Unix UTC (based 1970-01-01, in seconds). | 858 | * into Unix UTC (based 1970-01-01, in seconds). |
859 | */ | 859 | */ |
860 | struct timespec | 860 | struct timespec |
861 | cifs_NTtimeToUnix(u64 ntutc) | 861 | cifs_NTtimeToUnix(__le64 ntutc) |
862 | { | 862 | { |
863 | struct timespec ts; | 863 | struct timespec ts; |
864 | /* BB what about the timezone? BB */ | 864 | /* BB what about the timezone? BB */ |
@@ -866,7 +866,7 @@ cifs_NTtimeToUnix(u64 ntutc) | |||
866 | /* Subtract the NTFS time offset, then convert to 1s intervals. */ | 866 | /* Subtract the NTFS time offset, then convert to 1s intervals. */ |
867 | u64 t; | 867 | u64 t; |
868 | 868 | ||
869 | t = ntutc - NTFS_TIME_OFFSET; | 869 | t = le64_to_cpu(ntutc) - NTFS_TIME_OFFSET; |
870 | ts.tv_nsec = do_div(t, 10000000) * 100; | 870 | ts.tv_nsec = do_div(t, 10000000) * 100; |
871 | ts.tv_sec = t; | 871 | ts.tv_sec = t; |
872 | return ts; | 872 | return ts; |