hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I9UNQS CVE: NA
------------------------------------------
To properly set the dirty state of sub-pages during mmap write operations, it is necessary to ensure that the iop is created beforehand. This prevents issues where the iop might not yet be created when attempting to set the sub-page's dirty state.
This reverts commit 9df337860ce3b4de377a68a2b7e8c123fe4118ce.
Fixes: 99e9a55ba32b ("iomap: add support to track dirty state of sub pages") Signed-off-by: Long Li leo.lilong@huawei.com --- fs/iomap/buffered-io.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c index 25448d5827d2..304269c845e0 100644 --- a/fs/iomap/buffered-io.c +++ b/fs/iomap/buffered-io.c @@ -1073,6 +1073,7 @@ iomap_page_mkwrite_actor(struct inode *inode, loff_t pos, loff_t length, block_commit_write(page, 0, length); } else { WARN_ON_ONCE(!PageUptodate(page)); + iomap_page_create(inode, page); set_page_dirty(page); }