diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-13 21:15:42 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-13 21:15:42 -0800 |
commit | 9468482bd4c3b89abe04a770848d5eaa1ea830b0 (patch) | |
tree | 7bac4349702c6414e78d83e6d6febd633177f52a /fs/cifs/file.c | |
parent | 551a10c7fc14640d484ee3dda699758041d8123f (diff) | |
parent | 8af18971584d1e05770560206cfdfd1d6ba8a17f (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/sfrench/cifs-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
[CIFS] on reconnect to Samba - reset the unix capabilities
[CIFS] Allow update of EOF on remote extend of file
[CIFS] POSIX CIFS Extensions (continued) - POSIX Open
[CIFS] Additional POSIX CIFS Extensions infolevels
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 e9dcf5ee29a..07ff9351e9e 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; |