projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
51da8e8
)
ceph: check zero length in ceph_sync_read()
author
Yan, Zheng
<zheng.z.yan@intel.com>
Mon, 21 Jul 2014 02:15:48 +0000
(10:15 +0800)
committer
Yan, Zheng
<zheng.z.yan@intel.com>
Mon, 21 Jul 2014 02:17:05 +0000
(10:17 +0800)
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
fs/ceph/file.c
patch
|
blob
|
history
diff --git
a/fs/ceph/file.c
b/fs/ceph/file.c
index fec9ddcf1528a8cf009ff371f4534c4da5e28fa5..c66d4b4364370163d2c1ac1fed43b25682e8b0a0 100644
(file)
--- a/
fs/ceph/file.c
+++ b/
fs/ceph/file.c
@@
-423,6
+423,9
@@
static ssize_t ceph_sync_read(struct kiocb *iocb, struct iov_iter *i,
dout("sync_read on file %p %llu~%u %s\n", file, off,
(unsigned)len,
(file->f_flags & O_DIRECT) ? "O_DIRECT" : "");
+
+ if (!len)
+ return 0;
/*
* flush any page cache pages in this range. this
* will make concurrent normal and sync io slow,