summaryrefslogtreecommitdiff
path: root/fs/devpts
diff options
context:
space:
mode:
authorOmar Sandoval <osandov@fb.com>2019-09-16 11:30:55 -0700
committerDavid Sterba <dsterba@suse.com>2019-11-18 12:46:48 +0100
commite732fe95e4cad35fc1df278c23a32903341b08b3 (patch)
treece00fb9dc70673edb62aca1e5aabe0c90ae7fea7 /fs/devpts
parent9be490f1e15c34193b1aae17da58e14dd9f55a95 (diff)
downloadlinux-e732fe95e4cad35fc1df278c23a32903341b08b3.tar.gz
linux-e732fe95e4cad35fc1df278c23a32903341b08b3.tar.bz2
linux-e732fe95e4cad35fc1df278c23a32903341b08b3.zip
btrfs: don't prematurely free work in reada_start_machine_worker()
Currently, reada_start_machine_worker() frees the reada_machine_work and then calls __reada_start_machine() to do readahead. This is another potential instance of the bug in "btrfs: don't prematurely free work in run_ordered_work()". There _might_ already be a deadlock here: reada_start_machine_worker() can depend on itself through stacked filesystems (__read_start_machine() -> reada_start_machine_dev() -> reada_tree_block_flagged() -> read_extent_buffer_pages() -> submit_one_bio() -> btree_submit_bio_hook() -> btrfs_map_bio() -> submit_stripe_bio() -> submit_bio() onto a loop device can trigger readahead on the lower filesystem). Either way, let's fix it by freeing the work at the end. 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>
Diffstat (limited to 'fs/devpts')
0 files changed, 0 insertions, 0 deletions