linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH]fs/block_dev.c: Using .ki_left to judge whether do used .ki_left to judge
@ 2013-04-13  7:58 majianpeng
  0 siblings, 0 replies; only message in thread
From: majianpeng @ 2013-04-13  7:58 UTC (permalink / raw)
  To: Al Viro; +Cc: linux-fsdevel, linux-kernel

Signed-off-by: Jianpeng Ma <majianpeng@gmail.com>
---
 fs/block_dev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/block_dev.c b/fs/block_dev.c
index aae187a..f0328f1 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -1559,7 +1559,7 @@ static ssize_t blkdev_aio_read(struct kiocb *iocb, const struct iovec *iov,
         return 0;
 
     size -= pos;
-    if (size < INT_MAX)
+    if (size < iocb->ki_left)
         nr_segs = iov_shorten((struct iovec *)iov, nr_segs, size);
     return generic_file_aio_read(iocb, iov, nr_segs, pos);
 }
-- 
1.8.2.rc2.4.g7799588


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-04-13  7:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-13  7:58 [RFC PATCH]fs/block_dev.c: Using .ki_left to judge whether do used .ki_left to judge majianpeng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).