summaryrefslogtreecommitdiff
path: root/fs/btrfs/zstd.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2026-09-29 19:14:26 +0100
committerMark Brown <broonie@kernel.org>2026-09-29 19:14:26 +0100
commitf9aac7cea1ffe9f4a942a773a9be0d8c065f99f4 (patch)
tree42c5ffbda7f4a483ccc6ded37516862abdf66642 /fs/btrfs/zstd.c
parentcee9395acd8043be0644b25c34bfa86623f2b935 (diff)
parentb2047b8cadadccb1c9269ce756c399cd9aef2c82 (diff)
downloadlinux-next-f9aac7cea1ffe9f4a942a773a9be0d8c065f99f4.tar.gz
linux-next-f9aac7cea1ffe9f4a942a773a9be0d8c065f99f4.zip
Merge asoc-linus into asoc-next
Diffstat (limited to 'fs/btrfs/zstd.c')
-rw-r--r--fs/btrfs/zstd.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/fs/btrfs/zstd.c b/fs/btrfs/zstd.c
index 86919293fd54..58d9ff76fe07 100644
--- a/fs/btrfs/zstd.c
+++ b/fs/btrfs/zstd.c
@@ -307,8 +307,17 @@ again:
DEFINE_WAIT(wait);
prepare_to_wait(&zwsm->wait, &wait, TASK_UNINTERRUPTIBLE);
- schedule();
+ /*
+ * Re-check after being queued: zstd_put_workspace() only wakes
+ * a queue that already has a sleeper, so a workspace returned
+ * since the failed allocation woke nobody.
+ */
+ ws = zstd_find_workspace(fs_info, level);
+ if (!ws)
+ schedule();
finish_wait(&zwsm->wait, &wait);
+ if (ws)
+ return ws;
goto again;
}