mirror of
https://github.com/torvalds/linux.git
synced 2024-11-15 08:31:55 +00:00
ceph: check zero length in ceph_sync_read()
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
This commit is contained in:
parent
51da8e8c6f
commit
d0d0db2268
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user