[CIFS] Allow update of EOF on remote extend of file

Signed-off-by: Steve French <sfrench@us.ibm.com>
Cette révision appartient à :
Steve French
2007-02-08 18:14:13 +00:00
Parent 595dcfecf6
révision 7ba526316a
4 fichiers modifiés avec 11 ajouts et 8 suppressions

Voir le fichier

@@ -222,7 +222,7 @@ static void fill_in_inode(struct inode *tmp_inode, int new_buf_type,
atomic_set(&cifsInfo->inUse, 1);
}
if (is_size_safe_to_change(cifsInfo)) {
if (is_size_safe_to_change(cifsInfo, end_of_file)) {
/* can not safely change the file size here if the
client is writing to it due to potential races */
i_size_write(tmp_inode, end_of_file);
@@ -351,10 +351,10 @@ static void unix_fill_in_inode(struct inode *tmp_inode,
tmp_inode->i_gid = le64_to_cpu(pfindData->Gid);
tmp_inode->i_nlink = le64_to_cpu(pfindData->Nlinks);
if (is_size_safe_to_change(cifsInfo)) {
if (is_size_safe_to_change(cifsInfo, end_of_file)) {
/* can not safely change the file size here if the
client is writing to it due to potential races */
i_size_write(tmp_inode,end_of_file);
i_size_write(tmp_inode, end_of_file);
/* 512 bytes (2**9) is the fake blocksize that must be used */
/* for this calculation, not the real blocksize */