diff options
author | Mark Brown <broonie@kernel.org> | 2025-01-09 11:22:28 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2025-01-09 11:22:28 +0000 |
commit | 5640fd07b90ed43225704fecfbbda9d402dba1cf (patch) | |
tree | 7c9e9e13681499882d3c5d710e37b2f3b088e831 /fs/btrfs/disk-io.c | |
parent | a38509fd5cdc125ef54562760a05c68ebd4812bc (diff) | |
parent | 9d89551994a430b50c4fffcb1e617a057fa76e20 (diff) |
spi: Merge up v6.13-rc6
This fixes the i.MX6 and newer Meson platforms in my CI.
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r-- | fs/btrfs/disk-io.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 814320948645..eff0dd1ae62f 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -4262,6 +4262,15 @@ void __cold close_ctree(struct btrfs_fs_info *fs_info) * already the cleaner, but below we run all pending delayed iputs. */ btrfs_flush_workqueue(fs_info->fixup_workers); + /* + * Similar case here, we have to wait for delalloc workers before we + * proceed below and stop the cleaner kthread, otherwise we trigger a + * use-after-tree on the cleaner kthread task_struct when a delalloc + * worker running submit_compressed_extents() adds a delayed iput, which + * does a wake up on the cleaner kthread, which was already freed below + * when we call kthread_stop(). + */ + btrfs_flush_workqueue(fs_info->delalloc_workers); /* * After we parked the cleaner kthread, ordered extents may have |