aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/file.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-14 00:15:42 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-14 00:15:42 -0500
commit9468482bd4c3b89abe04a770848d5eaa1ea830b0 (patch)
tree7bac4349702c6414e78d83e6d6febd633177f52a /fs/cifs/file.c
parent551a10c7fc14640d484ee3dda699758041d8123f (diff)
parent8af18971584d1e05770560206cfdfd1d6ba8a17f (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.c5
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)
1954 refreshing the inode only on increases in the file size 1954 refreshing the inode only on increases in the file size
1955 but this is tricky to do without racing with writebehind 1955 but this is tricky to do without racing with writebehind
1956 page caching in the current Linux kernel design */ 1956 page caching in the current Linux kernel design */
1957int is_size_safe_to_change(struct cifsInodeInfo *cifsInode) 1957int is_size_safe_to_change(struct cifsInodeInfo *cifsInode, __u64 end_of_file)
1958{ 1958{
1959 struct cifsFileInfo *open_file = NULL; 1959 struct cifsFileInfo *open_file = NULL;
1960 1960
@@ -1976,6 +1976,9 @@ int is_size_safe_to_change(struct cifsInodeInfo *cifsInode)
1976 return 1; 1976 return 1;
1977 } 1977 }
1978 1978
1979 if(i_size_read(&cifsInode->vfs_inode) < end_of_file)
1980 return 1;
1981
1979 return 0; 1982 return 0;
1980 } else 1983 } else
1981 return 1; 1984 return 1;