diff options
Diffstat (limited to '')
-rw-r--r-- | fs/cifs/inode.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index 0cc7eddb077f..de02ed5e25c2 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c @@ -1805,8 +1805,10 @@ int cifs_getattr(struct vfsmount *mnt, struct dentry *dentry, if (!CIFS_I(inode)->clientCanCacheRead && inode->i_mapping && inode->i_mapping->nrpages != 0) { rc = filemap_fdatawait(inode->i_mapping); - mapping_set_error(inode->i_mapping, rc); - return rc; + if (rc) { + mapping_set_error(inode->i_mapping, rc); + return rc; + } } rc = cifs_revalidate_dentry_attr(dentry); |