aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/readdir.c
diff options
context:
space:
mode:
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,
106 return rc; 106 return rc;
107} 107}
108 108
109static void AdjustForTZ(struct cifsTconInfo * tcon, struct inode * inode)
110{
111 if((tcon) && (tcon->ses) && (tcon->ses->server)) {
112 inode->i_ctime.tv_sec += tcon->ses->server.timeAdj;
113 inode->i_mtime.tv_sec += tcon->ses->server.timeAdj;
114 inode->i_atime.tv_sec += tcon->ses->server.timeAdj;
115 }
116 return;
117}
118
119
109static void fill_in_inode(struct inode *tmp_inode, int new_buf_type, 120static void fill_in_inode(struct inode *tmp_inode, int new_buf_type,
110 char * buf, int *pobject_type, int isNewInode) 121 char * buf, int *pobject_type, int isNewInode)
111{ 122{
@@ -148,7 +159,7 @@ static void fill_in_inode(struct inode *tmp_inode, int new_buf_type,
148 tmp_inode->i_ctime = cnvrtDosUnixTm( 159 tmp_inode->i_ctime = cnvrtDosUnixTm(
149 le16_to_cpu(pfindData->LastWriteDate), 160 le16_to_cpu(pfindData->LastWriteDate),
150 le16_to_cpu(pfindData->LastWriteTime)); 161 le16_to_cpu(pfindData->LastWriteTime));
151 162 AdjustForTZ(cifs_sb->tcon, tmp_inode);
152 attr = le16_to_cpu(pfindData->Attributes); 163 attr = le16_to_cpu(pfindData->Attributes);
153 allocation_size = le32_to_cpu(pfindData->AllocationSize); 164 allocation_size = le32_to_cpu(pfindData->AllocationSize);
154 end_of_file = le32_to_cpu(pfindData->DataSize); 165 end_of_file = le32_to_cpu(pfindData->DataSize);