aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/inode.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-10-13 11:09:29 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-13 11:09:29 -0400
commit12e36b2f41b6cbc67386fcb9c59c32a3e2033905 (patch)
treeec1794bae2f96eef6cc2afb2fa5c48e6fd346316 /fs/cifs/inode.c
parent1baaf0b424fe611a99cf3e2e59e84df0561d679a (diff)
parent1a4e15a04ec69cb3552f4120079f5472377df5f7 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6: (27 commits) [CIFS] Missing flags2 for DFS [CIFS] Workaround incomplete byte length returned by some [CIFS] cifs Kconfig: don't select CONNECTOR [CIFS] Level 1 QPathInfo needed for proper OS2 support [CIFS] fix typo in previous patch [CIFS] Fix old DOS time conversion to handle timezone [CIFS] Do not need to adjust for Jan/Feb for leap day [CIFS] Fix leaps year calculation for years after 2100 [CIFS] readdir (ffirst) enablement of accurate timestamps from legacy servers [CIFS] Fix compiler warning with previous patch [CIFS] Fix typo [CIFS] Allow for 15 minute TZs (e.g. Nepal) and be more explicit about [CIFS] Fix readdir of large directories for backlevel servers [CIFS] Allow LANMAN21 support even in both POSIX non-POSIX path [CIFS] Make use of newer QFSInfo dependent on capability bit instead of [CIFS] Do not send newer QFSInfo to legacy servers which can not support it [CIFS] Fix typo in name of new cifs_show_stats [CIFS] Rename server time zone field [CIFS] Handle legacy servers which return undefined time zone [CIFS] CIFS support for /proc/<pid>/mountstats part 1 ... Manual conflict resolution in fs/cifs/connect.c
Diffstat (limited to 'fs/cifs/inode.c')
-rw-r--r--fs/cifs/inode.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index 6b90ef98e4cf..35d54bb0869a 100644
--- a/fs/cifs/inode.c
+++ b/fs/cifs/inode.c
@@ -337,6 +337,7 @@ int cifs_get_inode_info(struct inode **pinode,
337 pfindData = (FILE_ALL_INFO *)buf; 337 pfindData = (FILE_ALL_INFO *)buf;
338 /* could do find first instead but this returns more info */ 338 /* could do find first instead but this returns more info */
339 rc = CIFSSMBQPathInfo(xid, pTcon, search_path, pfindData, 339 rc = CIFSSMBQPathInfo(xid, pTcon, search_path, pfindData,
340 0 /* not legacy */,
340 cifs_sb->local_nls, cifs_sb->mnt_cifs_flags & 341 cifs_sb->local_nls, cifs_sb->mnt_cifs_flags &
341 CIFS_MOUNT_MAP_SPECIAL_CHR); 342 CIFS_MOUNT_MAP_SPECIAL_CHR);
342 /* BB optimize code so we do not make the above call 343 /* BB optimize code so we do not make the above call
@@ -384,8 +385,10 @@ int cifs_get_inode_info(struct inode **pinode,
384 /* get new inode */ 385 /* get new inode */
385 if (*pinode == NULL) { 386 if (*pinode == NULL) {
386 *pinode = new_inode(sb); 387 *pinode = new_inode(sb);
387 if (*pinode == NULL) 388 if (*pinode == NULL) {
389 kfree(buf);
388 return -ENOMEM; 390 return -ENOMEM;
391 }
389 /* Is an i_ino of zero legal? Can we use that to check 392 /* Is an i_ino of zero legal? Can we use that to check
390 if the server supports returning inode numbers? Are 393 if the server supports returning inode numbers? Are
391 there other sanity checks we can use to ensure that 394 there other sanity checks we can use to ensure that
@@ -431,8 +434,11 @@ int cifs_get_inode_info(struct inode **pinode,
431 (pTcon->ses->server->maxBuf - MAX_CIFS_HDR_SIZE) & 0xFFFFFE00;*/ 434 (pTcon->ses->server->maxBuf - MAX_CIFS_HDR_SIZE) & 0xFFFFFE00;*/
432 435
433 /* Linux can not store file creation time so ignore it */ 436 /* Linux can not store file creation time so ignore it */
434 inode->i_atime = 437 if(pfindData->LastAccessTime)
435 cifs_NTtimeToUnix(le64_to_cpu(pfindData->LastAccessTime)); 438 inode->i_atime = cifs_NTtimeToUnix
439 (le64_to_cpu(pfindData->LastAccessTime));
440 else /* do not need to use current_fs_time - time not stored */
441 inode->i_atime = CURRENT_TIME;
436 inode->i_mtime = 442 inode->i_mtime =
437 cifs_NTtimeToUnix(le64_to_cpu(pfindData->LastWriteTime)); 443 cifs_NTtimeToUnix(le64_to_cpu(pfindData->LastWriteTime));
438 inode->i_ctime = 444 inode->i_ctime =