Loading drivers/scsi/ufs/ufshcd.c +5 −2 Original line number Diff line number Diff line Loading @@ -4044,6 +4044,7 @@ static int ufshcd_exec_dev_cmd(struct ufs_hba *hba, int tag; struct completion wait; unsigned long flags; bool has_read_lock = false; /* * May get invoked from shutdown and IOCTL contexts. Loading @@ -4051,8 +4052,10 @@ static int ufshcd_exec_dev_cmd(struct ufs_hba *hba, * In error recovery context, it may come with lock acquired. */ if (!ufshcd_is_shutdown_ongoing(hba) && !ufshcd_eh_in_progress(hba)) if (!ufshcd_is_shutdown_ongoing(hba) && !ufshcd_eh_in_progress(hba)) { down_read(&hba->lock); has_read_lock = true; } /* * Get free slot, sleep if slots are unavailable. Loading Loading @@ -4090,7 +4093,7 @@ static int ufshcd_exec_dev_cmd(struct ufs_hba *hba, out_put_tag: ufshcd_put_dev_cmd_tag(hba, tag); wake_up(&hba->dev_cmd.tag_wq); if (!ufshcd_is_shutdown_ongoing(hba) && !ufshcd_eh_in_progress(hba)) if (has_read_lock) up_read(&hba->lock); return err; } Loading Loading
drivers/scsi/ufs/ufshcd.c +5 −2 Original line number Diff line number Diff line Loading @@ -4044,6 +4044,7 @@ static int ufshcd_exec_dev_cmd(struct ufs_hba *hba, int tag; struct completion wait; unsigned long flags; bool has_read_lock = false; /* * May get invoked from shutdown and IOCTL contexts. Loading @@ -4051,8 +4052,10 @@ static int ufshcd_exec_dev_cmd(struct ufs_hba *hba, * In error recovery context, it may come with lock acquired. */ if (!ufshcd_is_shutdown_ongoing(hba) && !ufshcd_eh_in_progress(hba)) if (!ufshcd_is_shutdown_ongoing(hba) && !ufshcd_eh_in_progress(hba)) { down_read(&hba->lock); has_read_lock = true; } /* * Get free slot, sleep if slots are unavailable. Loading Loading @@ -4090,7 +4093,7 @@ static int ufshcd_exec_dev_cmd(struct ufs_hba *hba, out_put_tag: ufshcd_put_dev_cmd_tag(hba, tag); wake_up(&hba->dev_cmd.tag_wq); if (!ufshcd_is_shutdown_ongoing(hba) && !ufshcd_eh_in_progress(hba)) if (has_read_lock) up_read(&hba->lock); return err; } Loading