summaryrefslogtreecommitdiff
path: root/mm/swap.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/swap.c')
-rw-r--r--mm/swap.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/mm/swap.c b/mm/swap.c
index 77b2d5997873..56d23d61c9cb 100644
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -45,6 +45,7 @@
/* How many pages do we try to swap or page in/out together? As a power of 2 */
int page_cluster;
+int bcachefs_shutdown;
static const int page_cluster_max = 31;
struct cpu_fbatches {
@@ -106,6 +107,13 @@ void __folio_put(struct folio *folio)
return;
}
+ if (folio_test_bcachefs_warn(folio) && bcachefs_shutdown) {
+ BUG();
+ dump_stack();
+ }
+
+ folio_clear_bcachefs_warn(folio);
+
page_cache_release(folio);
folio_unqueue_deferred_split(folio);
mem_cgroup_uncharge(folio);