From: "Matthew Wilcox (Oracle)" <willy@infradead.org>
To: Andreas Gruenbacher <agruenba@redhat.com>,
Christoph Hellwig <hch@infradead.org>,
"Darrick J . Wong" <djwong@kernel.org>
Cc: stable@vger.kernel.org, linux-xfs@vger.kernel.org,
"Matthew Wilcox \(Oracle\)" <willy@infradead.org>,
linux-fsdevel@vger.kernel.org, Gao Xiang <xiang@kernel.org>,
linux-erofs@lists.ozlabs.org
Subject: [PATCH] iomap: Add missing flush_dcache_page
Date: Fri, 16 Jul 2021 16:00:32 +0100 [thread overview]
Message-ID: <20210716150032.1089982-1-willy@infradead.org> (raw)
Inline data needs to be flushed from the kernel's view of a page before
it's mapped by userspace.
Cc: stable@vger.kernel.org
Fixes: 19e0c58f6552 ("iomap: generic inline data handling")
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
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 41da4f14c00b..fe60c603f4ca 100644
--- a/fs/iomap/buffered-io.c
+++ b/fs/iomap/buffered-io.c
@@ -222,6 +222,7 @@ iomap_read_inline_data(struct inode *inode, struct page *page,
memcpy(addr, iomap->inline_data, size);
memset(addr + size, 0, PAGE_SIZE - size);
kunmap_atomic(addr);
+ flush_dcache_page(page);
SetPageUptodate(page);
}
--
2.30.2
next reply other threads:[~2021-07-16 15:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-16 15:00 Matthew Wilcox (Oracle) [this message]
2021-07-16 15:04 ` [PATCH] iomap: Add missing flush_dcache_page Christoph Hellwig
2021-07-16 17:28 ` Matthew Wilcox
2021-07-19 8:39 ` Christoph Hellwig
2021-07-20 15:56 ` Matthew Wilcox
2021-07-16 15:04 ` Gao Xiang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210716150032.1089982-1-willy@infradead.org \
--to=willy@infradead.org \
--cc=agruenba@redhat.com \
--cc=djwong@kernel.org \
--cc=hch@infradead.org \
--cc=linux-erofs@lists.ozlabs.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=xiang@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).