[09/14] lustre: llite: return correct amount of bytes for short operations
diff mbox series

Message ID 1546810607-6348-10-git-send-email-jsimmons@infradead.org
State New
Headers show
Series
  • lustre: fixes for many test failures
Related show

Commit Message

James Simmons Jan. 6, 2019, 9:36 p.m. UTC
The incorrect number of bytes processed by ll_file_io_generic() is
returned. We need to add io->ci_nob to result.

Fixes: 623f55c4510 ("staging: lustre: llite: restart short read/write for normal IO")
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
 drivers/staging/lustre/lustre/llite/file.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch
diff mbox series

diff --git a/drivers/staging/lustre/lustre/llite/file.c b/drivers/staging/lustre/lustre/llite/file.c
index 5c6ebfa..b390971 100644
--- a/drivers/staging/lustre/lustre/llite/file.c
+++ b/drivers/staging/lustre/lustre/llite/file.c
@@ -1195,7 +1195,7 @@  static void ll_io_init(struct cl_io *io, const struct file *file, int write)
 	}
 
 	if (io->ci_nob > 0) {
-		result = io->ci_nob;
+		result += io->ci_nob;
 		count -= io->ci_nob;
 		*ppos = io->u.ci_wr.wr.crw_pos;