diff options
Diffstat (limited to 'fs/cifs/file.c')
| -rw-r--r-- | fs/cifs/file.c | 11 | 
1 files changed, 5 insertions, 6 deletions
| diff --git a/fs/cifs/file.c b/fs/cifs/file.c index 057e1dae12ab..ca2ba7a0193c 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c | |||
| @@ -219,8 +219,8 @@ static inline int cifs_open_inode_helper(struct inode *inode, struct file *file, | |||
| 219 | cFYI(1, ("inode unchanged on server")); | 219 | cFYI(1, ("inode unchanged on server")); | 
| 220 | } else { | 220 | } else { | 
| 221 | if (file->f_path.dentry->d_inode->i_mapping) { | 221 | if (file->f_path.dentry->d_inode->i_mapping) { | 
| 222 | /* BB no need to lock inode until after invalidate | 222 | /* BB no need to lock inode until after invalidate | 
| 223 | since namei code should already have it locked? */ | 223 | since namei code should already have it locked? */ | 
| 224 | rc = filemap_write_and_wait(file->f_path.dentry->d_inode->i_mapping); | 224 | rc = filemap_write_and_wait(file->f_path.dentry->d_inode->i_mapping); | 
| 225 | if (rc != 0) | 225 | if (rc != 0) | 
| 226 | CIFS_I(file->f_path.dentry->d_inode)->write_behind_rc = rc; | 226 | CIFS_I(file->f_path.dentry->d_inode)->write_behind_rc = rc; | 
| @@ -1890,11 +1890,10 @@ static ssize_t cifs_read(struct file *file, char *read_data, size_t read_size, | |||
| 1890 | 1890 | ||
| 1891 | int cifs_file_mmap(struct file *file, struct vm_area_struct *vma) | 1891 | int cifs_file_mmap(struct file *file, struct vm_area_struct *vma) | 
| 1892 | { | 1892 | { | 
| 1893 | struct dentry *dentry = file->f_path.dentry; | ||
| 1894 | int rc, xid; | 1893 | int rc, xid; | 
| 1895 | 1894 | ||
| 1896 | xid = GetXid(); | 1895 | xid = GetXid(); | 
| 1897 | rc = cifs_revalidate(dentry); | 1896 | rc = cifs_revalidate_file(file); | 
| 1898 | if (rc) { | 1897 | if (rc) { | 
| 1899 | cFYI(1, ("Validation prior to mmap failed, error=%d", rc)); | 1898 | cFYI(1, ("Validation prior to mmap failed, error=%d", rc)); | 
| 1900 | FreeXid(xid); | 1899 | FreeXid(xid); | 
| @@ -2289,9 +2288,9 @@ cifs_oplock_break(struct slow_work *work) | |||
| 2289 | if (inode && S_ISREG(inode->i_mode)) { | 2288 | if (inode && S_ISREG(inode->i_mode)) { | 
| 2290 | #ifdef CONFIG_CIFS_EXPERIMENTAL | 2289 | #ifdef CONFIG_CIFS_EXPERIMENTAL | 
| 2291 | if (cinode->clientCanCacheAll == 0) | 2290 | if (cinode->clientCanCacheAll == 0) | 
| 2292 | break_lease(inode, FMODE_READ); | 2291 | break_lease(inode, O_RDONLY); | 
| 2293 | else if (cinode->clientCanCacheRead == 0) | 2292 | else if (cinode->clientCanCacheRead == 0) | 
| 2294 | break_lease(inode, FMODE_WRITE); | 2293 | break_lease(inode, O_WRONLY); | 
| 2295 | #endif | 2294 | #endif | 
| 2296 | rc = filemap_fdatawrite(inode->i_mapping); | 2295 | rc = filemap_fdatawrite(inode->i_mapping); | 
| 2297 | if (cinode->clientCanCacheRead == 0) { | 2296 | if (cinode->clientCanCacheRead == 0) { | 
