aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/file.c
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2007-02-08 13:14:13 -0500
committerSteve French <sfrench@us.ibm.com>2007-02-08 13:14:13 -0500
commit7ba526316ae122e60c0c7a40793491f71b9ec590 (patch)
tree5cac6a04506e79823245cd2996572b48b468e736 /fs/cifs/file.c
parent595dcfecf642c8b0772989ed46f15ee03c25a205 (diff)
[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.c5
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)
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;