summaryrefslogtreecommitdiffstats
path: root/fs/cifs/readdir.c
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2006-10-12 00:02:32 +0000
committerSteve French <sfrench@us.ibm.com>2006-10-12 00:02:32 +0000
commit533f90af6d90b9e4859a158565385d1d84a79f75 (patch)
tree3f141cf47d27f24e623277d2d6be2a36191c1275 /fs/cifs/readdir.c
parent70903ca004fef17b0f6483714baefdb2f6ecceb0 (diff)
downloadblackbird-op-linux-533f90af6d90b9e4859a158565385d1d84a79f75.tar.gz
blackbird-op-linux-533f90af6d90b9e4859a158565385d1d84a79f75.zip
[CIFS] Fix old DOS time conversion to handle timezone
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/readdir.c')
-rw-r--r--fs/cifs/readdir.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c
index 81e7b2e5fb4d..80e6ebd440a8 100644
--- a/fs/cifs/readdir.c
+++ b/fs/cifs/readdir.c
@@ -106,6 +106,17 @@ static int construct_dentry(struct qstr *qstring, struct file *file,
return rc;
}
+static void AdjustForTZ(struct cifsTconInfo * tcon, struct inode * inode)
+{
+ if((tcon) && (tcon->ses) && (tcon->ses->server)) {
+ inode->i_ctime.tv_sec += tcon->ses->server.timeAdj;
+ inode->i_mtime.tv_sec += tcon->ses->server.timeAdj;
+ inode->i_atime.tv_sec += tcon->ses->server.timeAdj;
+ }
+ return;
+}
+
+
static void fill_in_inode(struct inode *tmp_inode, int new_buf_type,
char * buf, int *pobject_type, int isNewInode)
{
@@ -148,7 +159,7 @@ static void fill_in_inode(struct inode *tmp_inode, int new_buf_type,
tmp_inode->i_ctime = cnvrtDosUnixTm(
le16_to_cpu(pfindData->LastWriteDate),
le16_to_cpu(pfindData->LastWriteTime));
-
+ AdjustForTZ(cifs_sb->tcon, tmp_inode);
attr = le16_to_cpu(pfindData->Attributes);
allocation_size = le32_to_cpu(pfindData->AllocationSize);
end_of_file = le32_to_cpu(pfindData->DataSize);
OpenPOWER on IntegriCloud