Commit cd49bc20 authored by Long Li's avatar Long Li
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>
parent b1800a08
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);
	}