diff options
-rw-r--r-- | fs/cifs/cifsfs.c | 6 | ||||
-rw-r--r-- | fs/cifs/inode.c | 6 |
2 files changed, 8 insertions, 4 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) | |||
617 | if (!CIFS_I(inode)->clientCanCacheRead && inode->i_mapping && | 617 | if (!CIFS_I(inode)->clientCanCacheRead && inode->i_mapping && |
618 | inode->i_mapping->nrpages != 0) { | 618 | inode->i_mapping->nrpages != 0) { |
619 | rc = filemap_fdatawait(inode->i_mapping); | 619 | rc = filemap_fdatawait(inode->i_mapping); |
620 | mapping_set_error(inode->i_mapping, rc); | 620 | if (rc) { |
621 | return rc; | 621 | mapping_set_error(inode->i_mapping, rc); |
622 | return rc; | ||
623 | } | ||
622 | } | 624 | } |
623 | /* | 625 | /* |
624 | * Some applications poll for the file length in this strange | 626 | * Some applications poll for the file length in this strange |
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, | |||
1805 | if (!CIFS_I(inode)->clientCanCacheRead && inode->i_mapping && | 1805 | if (!CIFS_I(inode)->clientCanCacheRead && inode->i_mapping && |
1806 | inode->i_mapping->nrpages != 0) { | 1806 | inode->i_mapping->nrpages != 0) { |
1807 | rc = filemap_fdatawait(inode->i_mapping); | 1807 | rc = filemap_fdatawait(inode->i_mapping); |
1808 | mapping_set_error(inode->i_mapping, rc); | 1808 | if (rc) { |
1809 | return rc; | 1809 | mapping_set_error(inode->i_mapping, rc); |
1810 | return rc; | ||
1811 | } | ||
1810 | } | 1812 | } |
1811 | 1813 | ||
1812 | rc = cifs_revalidate_dentry_attr(dentry); | 1814 | rc = cifs_revalidate_dentry_attr(dentry); |