summaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifsfs.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--fs/cifs/cifsfs.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index ed92c7d36378..493b74ca5648 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -617,8 +617,10 @@ static loff_t cifs_llseek(struct file *file, loff_t offset, int origin)
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;
+ }
}
/*
* Some applications poll for the file length in this strange