* [PATCH] do_sync_read/write() should set kiocb.ki_nbytes to be consistent
@ 2010-03-24 17:09 David Howells
0 siblings, 0 replies; only message in thread
From: David Howells @ 2010-03-24 17:09 UTC (permalink / raw)
To: torvalds, akpm, viro; +Cc: bcrl, linux-kernel, linux-fsdevel, David Howells
do_sync_read/write() should set kiocb.ki_nbytes to be consistent with
do_sync_readv_writev().
Signed-off-by: David Howells <dhowells@redhat.com>
---
fs/read_write.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/fs/read_write.c b/fs/read_write.c
index b7f4a1f..113386d 100644
--- a/fs/read_write.c
+++ b/fs/read_write.c
@@ -258,6 +258,7 @@ ssize_t do_sync_read(struct file *filp, char __user *buf, size_t len, loff_t *pp
init_sync_kiocb(&kiocb, filp);
kiocb.ki_pos = *ppos;
kiocb.ki_left = len;
+ kiocb.ki_nbytes = len;
for (;;) {
ret = filp->f_op->aio_read(&kiocb, &iov, 1, kiocb.ki_pos);
@@ -313,6 +314,7 @@ ssize_t do_sync_write(struct file *filp, const char __user *buf, size_t len, lof
init_sync_kiocb(&kiocb, filp);
kiocb.ki_pos = *ppos;
kiocb.ki_left = len;
+ kiocb.ki_nbytes = len;
for (;;) {
ret = filp->f_op->aio_write(&kiocb, &iov, 1, kiocb.ki_pos);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-03-24 17:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-24 17:09 [PATCH] do_sync_read/write() should set kiocb.ki_nbytes to be consistent David Howells
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®