summaryrefslogtreecommitdiff
path: root/send-test.c
diff options
context:
space:
mode:
authorRakesh Pandit <rakesh@tuxera.com>2014-03-21 03:06:23 +0200
committerDavid Sterba <dsterba@suse.cz>2014-04-22 14:33:31 +0200
commita185d8541a4f9a7a23863277358229b45f091981 (patch)
treedfe4a8a1c850a3836890b4ed3b6a47c4ba5e9afd /send-test.c
parentfddeecb7d424d5bb1a93a19a5e537057a4a7f597 (diff)
Btrfs-progs: btrfs-image: don't call pthread_join on IDs not present
If pthread_create fails in mdrestore_init, then number of threads created could be less then num of threads option. Hence pass number of successful pthread_create calls to mdrestore_destroy, so that we don't call pthread_join on IDs not present when pthread_create fails. metadump_init already had this fixed, but repeats code from metadump_destroy. Reuse metadump_destroy by passing number of threads created (successful pthread_create calls) and save repeated cleaup code. Had to move metadump_destroy before metadump_init for obvious reasons. Signed-off-by: Rakesh Pandit <rakesh@tuxera.com> Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'send-test.c')
0 files changed, 0 insertions, 0 deletions