diff options
author | Steve French <sfrench@us.ibm.com> | 2007-02-08 18:14:13 (GMT) |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2007-02-08 18:14:13 (GMT) |
commit | 7ba526316ae122e60c0c7a40793491f71b9ec590 (patch) | |
tree | 5cac6a04506e79823245cd2996572b48b468e736 /fs/cifs/file.c | |
parent | 595dcfecf642c8b0772989ed46f15ee03c25a205 (diff) | |
download | linux-fsl-qoriq-7ba526316ae122e60c0c7a40793491f71b9ec590.tar.xz |
[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 e9dcf5e..07ff935 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; |