diff options
author | David Howells <dhowells@redhat.com> | 2010-03-24 17:09:19 +0000 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-24 16:43:29 -0700 |
commit | 61964eba5c419ff710ac996c5ed3a84d5af7490f (patch) | |
tree | 5f857102f1332f61ef52c2e3faacab3a7909bcbb /fs/read_write.c | |
parent | 47568d4c56677ede6e7ff7c8e4e0fd860a9c4372 (diff) | |
download | kernel-common-61964eba5c419ff710ac996c5ed3a84d5af7490f.tar.gz kernel-common-61964eba5c419ff710ac996c5ed3a84d5af7490f.tar.bz2 kernel-common-61964eba5c419ff710ac996c5ed3a84d5af7490f.zip |
do_sync_read/write() should set kiocb.ki_nbytes to be consistent
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>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/read_write.c')
-rw-r--r-- | 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 b7f4a1f94d48..113386d6fd2d 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); |