diff options
| author | Filipe Manana <fdmanana@suse.com> | 2026-11-13 17:36:57 +0000 |
|---|---|---|
| committer | David Sterba <dsterba@suse.com> | 2026-11-23 19:52:04 +0100 |
| commit | 85c98fd512bb3e2f326f1a1cac30f2fb0af30c6a (patch) | |
| tree | 5f949715ee7a76f16f4f2a2685e41d6cf197a46f /tools/perf/scripts/python | |
| parent | 6cd72166183bfc290fd853470232020c4b807aa2 (diff) | |
btrfs: fix blocking allocation for nowait encoded reads of inline extents
If we are doing a nowait encoded read of an inline extent, we are doing
a GFP_NOFS allocation for the temporary buffer, which can block. We are
also returning -ENOMEM on failure, which is wrong for a nowait context.
Fix this by using GFP_NOWAIT when we are in a nowait context and by
returning -EAGAIN instead of -ENOMEM if the allocation fails.
Fixes: 973a432637ed ("btrfs: don't sleep in btrfs_encoded_read() if IOCB_NOWAIT is set")
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
