diff options
Diffstat (limited to 'fs/cifs/inode.c')
-rw-r--r-- | fs/cifs/inode.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index c4fa91b8b62f..3f5bc83dc3d1 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c | |||
@@ -140,7 +140,7 @@ int cifs_get_inode_info_unix(struct inode **pinode, | |||
140 | inode->i_gid = le64_to_cpu(findData.Gid); | 140 | inode->i_gid = le64_to_cpu(findData.Gid); |
141 | inode->i_nlink = le64_to_cpu(findData.Nlinks); | 141 | inode->i_nlink = le64_to_cpu(findData.Nlinks); |
142 | 142 | ||
143 | if (is_size_safe_to_change(cifsInfo)) { | 143 | if (is_size_safe_to_change(cifsInfo, end_of_file)) { |
144 | /* can not safely change the file size here if the | 144 | /* can not safely change the file size here if the |
145 | client is writing to it due to potential races */ | 145 | client is writing to it due to potential races */ |
146 | 146 | ||
@@ -491,8 +491,8 @@ int cifs_get_inode_info(struct inode **pinode, | |||
491 | /* BB add code here - | 491 | /* BB add code here - |
492 | validate if device or weird share or device type? */ | 492 | validate if device or weird share or device type? */ |
493 | } | 493 | } |
494 | if (is_size_safe_to_change(cifsInfo)) { | 494 | if (is_size_safe_to_change(cifsInfo, le64_to_cpu(pfindData->EndOfFile))) { |
495 | /* can not safely change the file size here if the | 495 | /* can not safely shrink the file size here if the |
496 | client is writing to it due to potential races */ | 496 | client is writing to it due to potential races */ |
497 | i_size_write(inode,le64_to_cpu(pfindData->EndOfFile)); | 497 | i_size_write(inode,le64_to_cpu(pfindData->EndOfFile)); |
498 | 498 | ||