[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230118094329.9553-9-hch@lst.de>
Date: Wed, 18 Jan 2023 10:43:28 +0100
From: Christoph Hellwig <hch@....de>
To: Andrew Morton <akpm@...ux-foundation.org>,
Matthew Wilcox <willy@...radead.org>,
Hugh Dickins <hughd@...gle.com>
Cc: linux-afs@...ts.infradead.org, linux-btrfs@...r.kernel.org,
linux-ext4@...r.kernel.org, cluster-devel@...hat.com,
linux-mm@...ck.org, linux-xfs@...r.kernel.org,
linux-fsdevel@...r.kernel.org, linux-nilfs@...r.kernel.org
Subject: [PATCH 8/9] btrfs: handle a NULL folio in extent_range_redirty_for_io
filemap_get_folio can return NULL, skip those cases.
Signed-off-by: Christoph Hellwig <hch@....de>
---
fs/btrfs/extent_io.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index d55e4531ffd212..a54d2cf74ba020 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -230,6 +230,8 @@ void extent_range_redirty_for_io(struct inode *inode, u64 start, u64 end)
while (index <= end_index) {
folio = filemap_get_folio(mapping, index);
+ if (!folio)
+ continue;
filemap_dirty_folio(mapping, folio);
folio_account_redirty(folio);
index += folio_nr_pages(folio);
--
2.39.0
Powered by blists - more mailing lists