hulk inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I9UNQS CVE: NA
------------------------------------------
While running xfstests, specifically test xfs/032, the following errors were reported:
XFS (sdb): ino 4a data fork has delalloc extent at [0x3c:0x10] XFS: Assertion failed: 0, file: fs/xfs/xfs_icache.c, line: 1854
The issue stems from the dirty state of sub-pages not being set during mmap writes. This behavior was observed after the introduction of the commit 99e9a55ba32b ("iomap: add support to track dirty state of sub-pages"), which enabled iomap to track the dirty state of sub-pages when the block size is smaller than the page size. Currently, iomap updates the sub-page dirty state only in `__iomap_write_end()`. However, the mmap write path does not invoke this function, resulting in dirty pages created by mmap writes not being scheduled for write-back.
This patch fixes the issue by ensuring that the sub-page dirty state is set during mmap writes.
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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c index 25448d5827d2..73524df884bb 100644 --- a/fs/iomap/buffered-io.c +++ b/fs/iomap/buffered-io.c @@ -1073,7 +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)); - set_page_dirty(page); + iomap_set_range_dirty(page, offset_in_page(pos), length); }
return length;
反馈: 您发送到kernel@openeuler.org的补丁/补丁集,已成功转换为PR! PR链接地址: https://gitee.com/openeuler/kernel/pulls/8512 邮件列表地址:https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/K...
FeedBack: The patch(es) which you have sent to kernel@openeuler.org mailing list has been converted to a pull request successfully! Pull request link: https://gitee.com/openeuler/kernel/pulls/8512 Mailing list address: https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/K...