diff options
author | Jeff Layton <jlayton@redhat.com> | 2009-05-27 09:37:33 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2009-05-28 10:32:31 -0400 |
commit | 07119a4df8c8c77d888f2f46964ea9512ea84ff8 (patch) | |
tree | 546a3c2e66b60db890421c83106d5f6329e9ffce /fs/cifs/inode.c | |
parent | f55ed1a83d099f275c9560ad7d4c4700d1e54bdd (diff) |
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/inode.c')
-rw-r--r-- | fs/cifs/inode.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index 9c869a6dcba1..42d6e0fb6f31 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c | |||
@@ -85,10 +85,10 @@ static void cifs_unix_info_to_inode(struct inode *inode, | |||
85 | __u64 num_of_bytes = le64_to_cpu(info->NumOfBytes); | 85 | __u64 num_of_bytes = le64_to_cpu(info->NumOfBytes); |
86 | __u64 end_of_file = le64_to_cpu(info->EndOfFile); | 86 | __u64 end_of_file = le64_to_cpu(info->EndOfFile); |
87 | 87 | ||
88 | inode->i_atime = cifs_NTtimeToUnix(le64_to_cpu(info->LastAccessTime)); | 88 | inode->i_atime = cifs_NTtimeToUnix(info->LastAccessTime); |
89 | inode->i_mtime = | 89 | inode->i_mtime = |
90 | cifs_NTtimeToUnix(le64_to_cpu(info->LastModificationTime)); | 90 | cifs_NTtimeToUnix(info->LastModificationTime); |
91 | inode->i_ctime = cifs_NTtimeToUnix(le64_to_cpu(info->LastStatusChange)); | 91 | inode->i_ctime = cifs_NTtimeToUnix(info->LastStatusChange); |
92 | inode->i_mode = le64_to_cpu(info->Permissions); | 92 | inode->i_mode = le64_to_cpu(info->Permissions); |
93 | 93 | ||
94 | /* | 94 | /* |
@@ -554,14 +554,11 @@ int cifs_get_inode_info(struct inode **pinode, | |||
554 | 554 | ||
555 | /* Linux can not store file creation time so ignore it */ | 555 | /* Linux can not store file creation time so ignore it */ |
556 | if (pfindData->LastAccessTime) | 556 | if (pfindData->LastAccessTime) |
557 | inode->i_atime = cifs_NTtimeToUnix | 557 | inode->i_atime = cifs_NTtimeToUnix(pfindData->LastAccessTime); |
558 | (le64_to_cpu(pfindData->LastAccessTime)); | ||
559 | else /* do not need to use current_fs_time - time not stored */ | 558 | else /* do not need to use current_fs_time - time not stored */ |
560 | inode->i_atime = CURRENT_TIME; | 559 | inode->i_atime = CURRENT_TIME; |
561 | inode->i_mtime = | 560 | inode->i_mtime = cifs_NTtimeToUnix(pfindData->LastWriteTime); |
562 | cifs_NTtimeToUnix(le64_to_cpu(pfindData->LastWriteTime)); | 561 | inode->i_ctime = cifs_NTtimeToUnix(pfindData->ChangeTime); |
563 | inode->i_ctime = | ||
564 | cifs_NTtimeToUnix(le64_to_cpu(pfindData->ChangeTime)); | ||
565 | cFYI(DBG2, ("Attributes came in as 0x%x", attr)); | 562 | cFYI(DBG2, ("Attributes came in as 0x%x", attr)); |
566 | if (adjustTZ && (pTcon->ses) && (pTcon->ses->server)) { | 563 | if (adjustTZ && (pTcon->ses) && (pTcon->ses->server)) { |
567 | inode->i_ctime.tv_sec += pTcon->ses->server->timeAdj; | 564 | inode->i_ctime.tv_sec += pTcon->ses->server->timeAdj; |