diff options
author | Steve French <sfrench@us.ibm.com> | 2007-02-08 18:14:13 +0000 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2007-02-08 18:14:13 +0000 |
commit | 7ba526316ae122e60c0c7a40793491f71b9ec590 (patch) | |
tree | 5cac6a04506e79823245cd2996572b48b468e736 /fs/cifs/file.c | |
parent | 595dcfecf642c8b0772989ed46f15ee03c25a205 (diff) | |
download | linux-7ba526316ae122e60c0c7a40793491f71b9ec590.tar.bz2 |
[CIFS] Allow update of EOF on remote extend of file
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/file.c')
-rw-r--r-- | fs/cifs/file.c | 5 |
1 files changed, 4 insertions, 1 deletions
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; |