[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200824151700.16097-11-willy@infradead.org>
Date: Mon, 24 Aug 2020 16:16:59 +0100
From: "Matthew Wilcox (Oracle)" <willy@...radead.org>
To: linux-xfs@...r.kernel.org, linux-fsdevel@...r.kernel.org
Cc: "Matthew Wilcox (Oracle)" <willy@...radead.org>,
"Darrick J . Wong" <darrick.wong@...cle.com>,
linux-block@...r.kernel.org, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, Christoph Hellwig <hch@....de>
Subject: [PATCH 10/11] iomap: Inline data shouldn't see THPs
Assert that we're not seeing THPs in functions that read/write
inline data, rather than zeroing out the tail.
Signed-off-by: Matthew Wilcox (Oracle) <willy@...radead.org>
Reviewed-by: Christoph Hellwig <hch@....de>
---
fs/iomap/buffered-io.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c
index 52d371c59758..ca2aa1995519 100644
--- a/fs/iomap/buffered-io.c
+++ b/fs/iomap/buffered-io.c
@@ -210,6 +210,7 @@ iomap_read_inline_data(struct inode *inode, struct page *page,
return;
BUG_ON(page->index);
+ BUG_ON(PageCompound(page));
BUG_ON(size > PAGE_SIZE - offset_in_page(iomap->inline_data));
addr = kmap_atomic(page);
@@ -727,6 +728,7 @@ static size_t iomap_write_end_inline(struct inode *inode, struct page *page,
flush_dcache_page(page);
WARN_ON_ONCE(!PageUptodate(page));
+ BUG_ON(PageCompound(page));
BUG_ON(pos + copied > PAGE_SIZE - offset_in_page(iomap->inline_data));
addr = kmap_atomic(page);
--
2.28.0
Powered by blists - more mailing lists