VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   32 Branches   54 Tags
author: Matthew Bobrowski <mbobrowski@mbobrowski.org> 2019-09-19 15:32:44 -0700 committer: Darrick J. Wong <darrick.wong@oracle.com> 2019-09-19 15:32:44 -0700 commit: 6fe7b9901400152238e1b76198747f6716c78aad parent: 609488bc979f99f805f34e9a32c1e3b71179d10b
Commit Summary:
iomap: split size and error for iomap_dio_rw ->end_io
Diffstat:
1 file changed, 3 insertions, 6 deletions
diff --git a/fs/iomap/direct-io.c b/fs/iomap/direct-io.c
index 10517cea9682..2ccf1c6460d4 100644
--- a/fs/iomap/direct-io.c
+++ b/fs/iomap/direct-io.c
@@ -77,13 +77,10 @@ static ssize_t iomap_dio_complete(struct iomap_dio *dio)
 	loff_t offset = iocb->ki_pos;
 	ssize_t ret;
 
-	if (dio->end_io) {
-		ret = dio->end_io(iocb,
-				dio->error ? dio->error : dio->size,
-				dio->flags);
-	} else {
+	if (dio->end_io)
+		ret = dio->end_io(iocb, dio->size, dio->error, dio->flags);
+	else
 		ret = dio->error;
-	}
 
 	if (likely(!ret)) {
 		ret = dio->size;