diff options
Diffstat (limited to 'fs/cifs/file.c')
-rw-r--r-- | fs/cifs/file.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index 14a1c72ced92..5ade53d7bca8 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c | |||
@@ -127,8 +127,7 @@ static inline int cifs_open_inode_helper(struct inode *inode, struct file *file, | |||
127 | if (file->f_dentry->d_inode->i_mapping) { | 127 | if (file->f_dentry->d_inode->i_mapping) { |
128 | /* BB no need to lock inode until after invalidate | 128 | /* BB no need to lock inode until after invalidate |
129 | since namei code should already have it locked? */ | 129 | since namei code should already have it locked? */ |
130 | filemap_fdatawrite(file->f_dentry->d_inode->i_mapping); | 130 | filemap_write_and_wait(file->f_dentry->d_inode->i_mapping); |
131 | filemap_fdatawait(file->f_dentry->d_inode->i_mapping); | ||
132 | } | 131 | } |
133 | cFYI(1, ("invalidating remote inode since open detected it " | 132 | cFYI(1, ("invalidating remote inode since open detected it " |
134 | "changed")); | 133 | "changed")); |
@@ -419,8 +418,7 @@ static int cifs_reopen_file(struct inode *inode, struct file *file, | |||
419 | pCifsInode = CIFS_I(inode); | 418 | pCifsInode = CIFS_I(inode); |
420 | if (pCifsInode) { | 419 | if (pCifsInode) { |
421 | if (can_flush) { | 420 | if (can_flush) { |
422 | filemap_fdatawrite(inode->i_mapping); | 421 | filemap_write_and_wait(inode->i_mapping); |
423 | filemap_fdatawait(inode->i_mapping); | ||
424 | /* temporarily disable caching while we | 422 | /* temporarily disable caching while we |
425 | go to server to get inode info */ | 423 | go to server to get inode info */ |
426 | pCifsInode->clientCanCacheAll = FALSE; | 424 | pCifsInode->clientCanCacheAll = FALSE; |