aboutsummaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/ceph/file.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/ceph/file.c b/fs/ceph/file.c
index 1ac0a59867d..5de16f5ac7e 100644
--- a/fs/ceph/file.c
+++ b/fs/ceph/file.c
@@ -373,7 +373,7 @@ more:
goto more;
}
- if (ret >= 0) {
+ if (read > 0) {
ret = read;
/* did we bounce off eof? */
if (pos + left > inode->i_size)
@@ -611,6 +611,8 @@ out:
if (check_caps)
ceph_check_caps(ceph_inode(inode), CHECK_CAPS_AUTHONLY,
NULL);
+ } else if (ret != -EOLDSNAPC && written > 0) {
+ ret = written;
}
return ret;
}