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

Signed-off-by: Steve French <sfrench@us.ibm.com>
This commit is contained in:
Steve French
2007-02-08 18:14:13 +00:00
parent 595dcfecf6
commit 7ba526316a
4 changed files with 11 additions and 8 deletions

View File

@@ -1954,7 +1954,7 @@ static int cifs_readpage(struct file *file, struct page *page)
refreshing the inode only on increases in the file size
but this is tricky to do without racing with writebehind
page caching in the current Linux kernel design */
int is_size_safe_to_change(struct cifsInodeInfo *cifsInode)
int is_size_safe_to_change(struct cifsInodeInfo *cifsInode, __u64 end_of_file)
{
struct cifsFileInfo *open_file = NULL;
@@ -1976,6 +1976,9 @@ int is_size_safe_to_change(struct cifsInodeInfo *cifsInode)
return 1;
}
if(i_size_read(&cifsInode->vfs_inode) < end_of_file)
return 1;
return 0;
} else
return 1;