]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: don't prematurely free work in scrub_missing_raid56_worker()
authorOmar Sandoval <osandov@fb.com>
Mon, 16 Sep 2019 18:30:56 +0000 (11:30 -0700)
committerDavid Sterba <dsterba@suse.com>
Mon, 18 Nov 2019 11:46:48 +0000 (12:46 +0100)
commit1f8b29bbd59ac4d0798acbc3eeafd639e7e67b25
tree9e09bcb870dad12cdffc8a68166926f9c17a242b
parent8d8331bea83ca29aa38a2376680af9c29111e017
btrfs: don't prematurely free work in scrub_missing_raid56_worker()

Currently, scrub_missing_raid56_worker() puts and potentially frees
sblock (which embeds the work item) and then submits a bio through
scrub_wr_submit(). This is another potential instance of the bug in
"btrfs: don't prematurely free work in run_ordered_work()". Fix it by
dropping the reference after we submit the bio.

Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Omar Sandoval <osandov@fb.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/scrub.c