summaryrefslogtreecommitdiffstats
path: root/fs/cifs/netmisc.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2009-05-27 09:37:33 -0400
committerSteve French <sfrench@us.ibm.com>2009-05-28 14:32:31 +0000
commit07119a4df8c8c77d888f2f46964ea9512ea84ff8 (patch)
tree546a3c2e66b60db890421c83106d5f6329e9ffce /fs/cifs/netmisc.c
parentf55ed1a83d099f275c9560ad7d4c4700d1e54bdd (diff)
downloadlinux-07119a4df8c8c77d888f2f46964ea9512ea84ff8.tar.bz2
cifs: have cifs_NTtimeToUnix take a little-endian arg
...and just have the function call le64_to_cpu. Signed-off-by: Jeff Layton <jlayton@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/netmisc.c')
-rw-r--r--fs/cifs/netmisc.c12
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)
#define NTFS_TIME_OFFSET ((u64)(369*365 + 89) * 24 * 3600 * 10000000)
- /*
- * Convert the NT UTC (based 1601-01-01, in hundred nanosecond units)
- * into Unix UTC (based 1970-01-01, in seconds).
- */
+/*
+ * Convert the NT UTC (based 1601-01-01, in hundred nanosecond units)
+ * into Unix UTC (based 1970-01-01, in seconds).
+ */
struct timespec
-cifs_NTtimeToUnix(u64 ntutc)
+cifs_NTtimeToUnix(__le64 ntutc)
{
struct timespec ts;
/* BB what about the timezone? BB */
@@ -866,7 +866,7 @@ cifs_NTtimeToUnix(u64 ntutc)
/* Subtract the NTFS time offset, then convert to 1s intervals. */
u64 t;
- t = ntutc - NTFS_TIME_OFFSET;
+ t = le64_to_cpu(ntutc) - NTFS_TIME_OFFSET;
ts.tv_nsec = do_div(t, 10000000) * 100;
ts.tv_sec = t;
return ts;