Commit ee49250
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: [email protected] # 6.6+
Reviewed-by: Qu Wenruo <[email protected]>
Signed-off-by: Zilin Guan <[email protected]>
Reviewed-by: David Sterba <[email protected]>
Signed-off-by: David Sterba <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>1 parent 92f06ab commit ee49250
1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2091 | 2091 | | |
2092 | 2092 | | |
2093 | 2093 | | |
| 2094 | + | |
2094 | 2095 | | |
2095 | 2096 | | |
2096 | 2097 | | |
| |||
2100 | 2101 | | |
2101 | 2102 | | |
2102 | 2103 | | |
| 2104 | + | |
2103 | 2105 | | |
2104 | 2106 | | |
2105 | 2107 | | |
| |||
0 commit comments