summaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifsfs.c
diff options
context:
space:
mode:
authorSteve French2011-05-20 19:00:01 +0200
committerSteve French2011-05-20 19:00:01 +0200
commit156ecb2d8b06589098f6ce3012e6a10fef07c416 (patch)
tree4008ea00d8c49ff2361ebe784a1e757c8cad9986 /fs/cifs/cifsfs.c
parent[CIFS] Remove sparse warning (diff)
downloadkernel-qcow2-linux-156ecb2d8b06589098f6ce3012e6a10fef07c416.tar.gz
kernel-qcow2-linux-156ecb2d8b06589098f6ce3012e6a10fef07c416.tar.xz
kernel-qcow2-linux-156ecb2d8b06589098f6ce3012e6a10fef07c416.zip
[CIFS] Fix to problem with getattr caused by invalidate simplification patch
Fix to earlier "Simplify invalidate part (try #6)" patch That patch caused problems with connectathon test 5. Reviewed-by: Jeff Layton <jlayton@samba.org> Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/cifsfs.c')
-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