diff options
Diffstat (limited to 'fs/cifs/cifssmb.c')
-rw-r--r-- | fs/cifs/cifssmb.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index 075d8fb3d376..2851d6e0d823 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c | |||
@@ -2856,7 +2856,6 @@ qsec_out: | |||
2856 | return rc; | 2856 | return rc; |
2857 | } | 2857 | } |
2858 | 2858 | ||
2859 | |||
2860 | /* Legacy Query Path Information call for lookup to old servers such | 2859 | /* Legacy Query Path Information call for lookup to old servers such |
2861 | as Win9x/WinME */ | 2860 | as Win9x/WinME */ |
2862 | int SMBQueryInformation(const int xid, struct cifsTconInfo *tcon, | 2861 | int SMBQueryInformation(const int xid, struct cifsTconInfo *tcon, |
@@ -2898,7 +2897,16 @@ QInfRetry: | |||
2898 | if (rc) { | 2897 | if (rc) { |
2899 | cFYI(1, ("Send error in QueryInfo = %d", rc)); | 2898 | cFYI(1, ("Send error in QueryInfo = %d", rc)); |
2900 | } else if (pFinfo) { /* decode response */ | 2899 | } else if (pFinfo) { /* decode response */ |
2900 | struct timespec ts; | ||
2901 | __u32 time = le32_to_cpu(pSMBr->last_write_time); | ||
2902 | /* BB FIXME - add time zone adjustment BB */ | ||
2901 | memset(pFinfo, 0, sizeof(FILE_ALL_INFO)); | 2903 | memset(pFinfo, 0, sizeof(FILE_ALL_INFO)); |
2904 | ts.tv_nsec = 0; | ||
2905 | ts.tv_sec = time; | ||
2906 | /* decode time fields */ | ||
2907 | pFinfo->ChangeTime = cifs_UnixTimeToNT(ts); | ||
2908 | pFinfo->LastWriteTime = pFinfo->ChangeTime; | ||
2909 | pFinfo->LastAccessTime = 0; | ||
2902 | pFinfo->AllocationSize = | 2910 | pFinfo->AllocationSize = |
2903 | cpu_to_le64(le32_to_cpu(pSMBr->size)); | 2911 | cpu_to_le64(le32_to_cpu(pSMBr->size)); |
2904 | pFinfo->EndOfFile = pFinfo->AllocationSize; | 2912 | pFinfo->EndOfFile = pFinfo->AllocationSize; |