VisionFive2 Linux kernel

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

More than 9999 Commits   32 Branches   54 Tags
author: Goldwyn Rodrigues <rgoldwyn@suse.com> 2020-09-28 08:51:08 -0700 committer: Darrick J. Wong <darrick.wong@oracle.com> 2020-09-28 08:51:08 -0700 commit: 1a31182edd0083bb9f26e582ed39f92f898c4d0a parent: c3d4ed1abecfcfc801199cfadb71f5b80e025d9e
Commit Summary:
iomap: Call inode_dio_end() before generic_write_sync()
Diffstat:
1 file changed, 1 insertion, 1 deletion
diff --git a/fs/iomap/direct-io.c b/fs/iomap/direct-io.c
index b005ef5f554e..933f234d5bec 100644
--- a/fs/iomap/direct-io.c
+++ b/fs/iomap/direct-io.c
@@ -118,6 +118,7 @@ ssize_t iomap_dio_complete(struct iomap_dio *dio)
 			dio_warn_stale_pagecache(iocb->ki_filp);
 	}
 
+	inode_dio_end(file_inode(iocb->ki_filp));
 	/*
 	 * If this is a DSYNC write, make sure we push it to stable storage now
 	 * that we've written data.
@@ -125,7 +126,6 @@ ssize_t iomap_dio_complete(struct iomap_dio *dio)
 	if (ret > 0 && (dio->flags & IOMAP_DIO_NEED_SYNC))
 		ret = generic_write_sync(iocb, ret);
 
-	inode_dio_end(file_inode(iocb->ki_filp));
 	kfree(dio);
 
 	return ret;