From 7ba526316ae122e60c0c7a40793491f71b9ec590 Mon Sep 17 00:00:00 2001 From: Steve French Date: Thu, 8 Feb 2007 18:14:13 +0000 Subject: [CIFS] Allow update of EOF on remote extend of file Signed-off-by: Steve French --- fs/cifs/file.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'fs/cifs/file.c') diff --git a/fs/cifs/file.c b/fs/cifs/file.c index e9dcf5ee29a2..07ff9351e9ee 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c @@ -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; -- cgit v1.2.3