Commit 6c569c9
btrfs: scrub: put bio after errors in scrub_raid56_parity_stripe()
commit 5fea61a upstream.
scrub_raid56_parity_stripe() allocates a bio with bio_alloc(), but
fails to release it on some error paths, leading to a potential
memory leak.
Add the missing bio_put() calls to properly drop the bio reference
in those error cases.
Fixes: 1009254 ("btrfs: scrub: use scrub_stripe to implement RAID56 P/Q scrub")
CC: stable@vger.kernel.org # 6.6+
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Zilin Guan <zilin@seu.edu.cn>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent 72b3b2e commit 6c569c9
1 file changed
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2185 | 2185 | | |
2186 | 2186 | | |
2187 | 2187 | | |
| 2188 | + | |
2188 | 2189 | | |
2189 | 2190 | | |
2190 | 2191 | | |
| |||
2194 | 2195 | | |
2195 | 2196 | | |
2196 | 2197 | | |
| 2198 | + | |
2197 | 2199 | | |
2198 | 2200 | | |
2199 | 2201 | | |
| |||
0 commit comments