diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2025-04-30 15:40:38 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2025-04-30 15:40:38 -0400 |
commit | e7acf15b702df37aa3571cc28a8f2dd39b80b20d (patch) | |
tree | 4d72f794497d490c98afc32fdb22a8676a2d2bcc /mm/swap.c | |
parent | 2f1171b09647142da831c47675b419da3fdf4707 (diff) |
pop assert when freeing page after bcachefs shutdownbcachefs-put-folio-assert
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'mm/swap.c')
-rw-r--r-- | mm/swap.c | 8 |
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); |