Linux-mm Archive on lore.kernel.org
 help / color / Atom feed
From: "Matthew Wilcox (Oracle)" <willy@infradead.org>
To: linux-mm@kvack.org, akpm@linux-foundation.org
Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>
Subject: [PATCH 4/4] fix mm-filemap-add-mapping_seek_hole_data.patch
Date: Tue, 24 Nov 2020 04:15:07 +0000
Message-ID: <20201124041507.28996-4-willy@infradead.org> (raw)
In-Reply-To: <20201124041507.28996-1-willy@infradead.org>

---
 mm/filemap.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/mm/filemap.c b/mm/filemap.c
index 7dfd7024d361..a2150a6c15e4 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -2706,7 +2706,8 @@ loff_t mapping_seek_hole_data(struct address_space *mapping, loff_t start,
 				seek_data);
 		if (start < pos)
 			goto unlock;
-		put_page(page);
+		if (!xa_is_value(page))
+			put_page(page);
 	}
 	rcu_read_unlock();
 
-- 
2.29.2



      parent reply index

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-24  4:15 [PATCH 1/4] mm: Support THPs in zero_user_segments Matthew Wilcox (Oracle)
2020-11-24  4:15 ` [PATCH 2/4] fix mm-filemap-add-helper-for-finding-pages.patch Matthew Wilcox (Oracle)
2020-11-24  4:15 ` [PATCH 3/4] fix mm-add-and-use-find_lock_entries.patch Matthew Wilcox (Oracle)
2020-11-24  4:15 ` Matthew Wilcox (Oracle) [this message]

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=20201124041507.28996-4-willy@infradead.org \
    --to=willy@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-mm@kvack.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

Linux-mm Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-mm/0 linux-mm/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-mm linux-mm/ https://lore.kernel.org/linux-mm \
		linux-mm@kvack.org
	public-inbox-index linux-mm

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kvack.linux-mm


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git