Commit 00f8b41a authored by Long Li's avatar Long Li Committed by openeuler-sync-bot
Browse files

Revert "iomap: Don't create iomap_page objects in iomap_page_mkwrite_actor"

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 9df33786.

Fixes: 99e9a55b ("iomap: add support to track dirty state of sub pages")
Signed-off-by: default avatarLong Li <leo.lilong@huawei.com>
(cherry picked from commit cd49bc20)
parent 6e0dcb04
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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);
	}