Re: [PATCH] iomap: Set all uptodate bits for an Uptodate page

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 24, 2020 at 10:04:40PM +0200, Sedat Dilek wrote:
> On Thu, Sep 24, 2020 at 10:02 PM Matthew Wilcox <willy@xxxxxxxxxxxxx> wrote:
> >
> > On Thu, Sep 24, 2020 at 09:54:36PM +0200, Sedat Dilek wrote:
> > > You are named in "mm: fix misplaced unlock_page in do_wp_page()".
> > > Is this here a different issue?
> >
> > Yes, completely different.  That bug is one Linus introduced in this
> > cycle; the bug that this patch fixes was introduced a couple of years
> > ago, and we only noticed now because I added an assertion to -next.
> > Maybe I should add the assertion for 5.9 too.
> 
> Can you point me to this "assertion"?
> Thanks.

Here's the version against 5.8

diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c
index 810f7dae11d9..b421e4efc4bd 100644
--- a/fs/iomap/buffered-io.c
+++ b/fs/iomap/buffered-io.c
@@ -70,11 +70,15 @@ static void
 iomap_page_release(struct page *page)
 {
 	struct iomap_page *iop = detach_page_private(page);
+	unsigned int nr_blocks = PAGE_SIZE / i_blocksize(page->mapping->host);
 
 	if (!iop)
 		return;
 	WARN_ON_ONCE(atomic_read(&iop->read_count));
 	WARN_ON_ONCE(atomic_read(&iop->write_count));
+	WARN_ON_ONCE(bitmap_full(iop->uptodate, nr_blocks) !=
+			PageUptodate(page));
+
 	kfree(iop);
 }
 



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux