diff options
Diffstat (limited to 'fs/cifs/inode.c')
-rw-r--r-- | fs/cifs/inode.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index 94979309698a..39869c3c3efb 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c | |||
@@ -1682,8 +1682,7 @@ cifs_invalidate_mapping(struct inode *inode) | |||
1682 | /* write back any cached data */ | 1682 | /* write back any cached data */ |
1683 | if (inode->i_mapping && inode->i_mapping->nrpages != 0) { | 1683 | if (inode->i_mapping && inode->i_mapping->nrpages != 0) { |
1684 | rc = filemap_write_and_wait(inode->i_mapping); | 1684 | rc = filemap_write_and_wait(inode->i_mapping); |
1685 | if (rc) | 1685 | mapping_set_error(inode->i_mapping, rc); |
1686 | cifs_i->write_behind_rc = rc; | ||
1687 | } | 1686 | } |
1688 | invalidate_remote_inode(inode); | 1687 | invalidate_remote_inode(inode); |
1689 | cifs_fscache_reset_inode_cookie(inode); | 1688 | cifs_fscache_reset_inode_cookie(inode); |
@@ -1943,10 +1942,8 @@ cifs_setattr_unix(struct dentry *direntry, struct iattr *attrs) | |||
1943 | * the flush returns error? | 1942 | * the flush returns error? |
1944 | */ | 1943 | */ |
1945 | rc = filemap_write_and_wait(inode->i_mapping); | 1944 | rc = filemap_write_and_wait(inode->i_mapping); |
1946 | if (rc != 0) { | 1945 | mapping_set_error(inode->i_mapping, rc); |
1947 | cifsInode->write_behind_rc = rc; | 1946 | rc = 0; |
1948 | rc = 0; | ||
1949 | } | ||
1950 | 1947 | ||
1951 | if (attrs->ia_valid & ATTR_SIZE) { | 1948 | if (attrs->ia_valid & ATTR_SIZE) { |
1952 | rc = cifs_set_file_size(inode, attrs, xid, full_path); | 1949 | rc = cifs_set_file_size(inode, attrs, xid, full_path); |
@@ -2087,10 +2084,8 @@ cifs_setattr_nounix(struct dentry *direntry, struct iattr *attrs) | |||
2087 | * the flush returns error? | 2084 | * the flush returns error? |
2088 | */ | 2085 | */ |
2089 | rc = filemap_write_and_wait(inode->i_mapping); | 2086 | rc = filemap_write_and_wait(inode->i_mapping); |
2090 | if (rc != 0) { | 2087 | mapping_set_error(inode->i_mapping, rc); |
2091 | cifsInode->write_behind_rc = rc; | 2088 | rc = 0; |
2092 | rc = 0; | ||
2093 | } | ||
2094 | 2089 | ||
2095 | if (attrs->ia_valid & ATTR_SIZE) { | 2090 | if (attrs->ia_valid & ATTR_SIZE) { |
2096 | rc = cifs_set_file_size(inode, attrs, xid, full_path); | 2091 | rc = cifs_set_file_size(inode, attrs, xid, full_path); |