Skip to contentSkip to conversation

fs/block_dev.c: Using .ki_left to judge whether do used .ki_left to judge

RFC PATCH New majianpeng 1 participant 1 message Apr 13, 2013 VFS

lore
Share & tools
lore

majianpeng

author
#0 lore raw

RFC PATCH 1/1 fs/block_dev.c: Using .ki_left to judge whether do used .ki_left to judge

---
 fs/block_dev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/block_dev.c +1 -1
index aae187a..f0328f1 100644
@@ -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);
 }
Signature · 1 line
1.8.2.rc2.4.g7799588