Btrfs-progs: scrub: disable thread cancelability during mutex locks
scrub_progress_cycle thread runs in asynchronous type but locks mutex
while reading shared data. This patch disables cancelability for a
brief time while locks are on so as to make sure they are unlocked
before thread is canceled.
scrub_write_progress gets called from scrub_progress_cycle in
asynchronous thread but cancelability is disabled after mutex is
locked. This patch moves the call to set cancelability type before
mutex lock and makes corresponding changes to labels for error
handling.
Signed-off-by: Rakesh Pandit <rakesh@tuxera.com>
Signed-off-by: David Sterba <dsterba@suse.cz>