summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/fs-io.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-03-27 15:16:24 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:09:59 -0400
commitc437e1537916e3c0fcc04387888e402a5940e49c (patch)
treef53c390df1b3987f03e67d541db587cc3b06e3dc /fs/bcachefs/fs-io.c
parent2776369266ad04095204128d72cf0d429b5fb678 (diff)
downloadlinux-c437e1537916e3c0fcc04387888e402a5940e49c.tar.gz
linux-c437e1537916e3c0fcc04387888e402a5940e49c.tar.bz2
linux-c437e1537916e3c0fcc04387888e402a5940e49c.zip
bcachefs: Add a bch_page_state assert
Seeing an odd bug with page/folio state not being properly initialized, this is to help track it down. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/fs-io.c')
-rw-r--r--fs/bcachefs/fs-io.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/bcachefs/fs-io.c b/fs/bcachefs/fs-io.c
index d98b654c92b1..e25dbbf46107 100644
--- a/fs/bcachefs/fs-io.c
+++ b/fs/bcachefs/fs-io.c
@@ -2682,6 +2682,8 @@ static int __bch2_truncate_page(struct bch_inode_info *inode,
goto unlock;
}
+ BUG_ON(!s->uptodate);
+
if (index != start >> PAGE_SHIFT)
start_offset = 0;
if (index != end >> PAGE_SHIFT)