commit | d0d0db2268cc343c2361c83510d8e9711021fcce | [log] [tgz] |
---|---|---|
author | Yan, Zheng <zheng.z.yan@intel.com> | Mon Jul 21 10:15:48 2014 +0800 |
committer | Yan, Zheng <zheng.z.yan@intel.com> | Mon Jul 21 10:17:05 2014 +0800 |
tree | 6a943b1002888c6d2f09f55c829c9538511a2f8d | |
parent | 51da8e8c6f687ff94d4a7d39633f7547d944321f [diff] [blame] |
ceph: check zero length in ceph_sync_read() Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
diff --git a/fs/ceph/file.c b/fs/ceph/file.c index fec9ddc..c66d4b4 100644 --- a/fs/ceph/file.c +++ b/fs/ceph/file.c
@@ -423,6 +423,9 @@ 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,