/* BSG support fc_destroy_bsgjob - routine to teardown/delete a fc bsg job @job: fc_bsg_job that is to be torn down  */
static void fc_destroy_bsgjob(struct fc_bsg_job *job)
/* BSG support fc_destroy_bsgjob - routine to teardown/delete a fc bsg job @job: fc_bsg_job that is to be torn down  */
static void fc_destroy_bsgjob(struct fc_bsg_job *job)
{
	unsigned long flags;
	spin_lock_irqsave(&job->job_lock, flags);
	if (job->ref_cnt) {
		spin_unlock_irqrestore(&job->job_lock, flags);
		return;
	}
	spin_unlock_irqrestore(&job->job_lock, flags);
	put_device(job->dev);
	kfree(job->request_payload.sg_list);
	kfree(job->reply_payload.sg_list);
	kfree(job);
}