OSDN Git Service

Scsi: ufs: fix issue of task tag in used
authorZiqi Chen <ziqichen@codeaurora.org>
Wed, 27 Mar 2019 07:50:27 +0000 (15:50 +0800)
committerZiqi Chen <ziqichen@codeaurora.org>
Fri, 29 Mar 2019 03:12:40 +0000 (11:12 +0800)
Fix a coding error that lrb_in_use bitmap is cleared twice after its
corresponding request is completed. Otherwise, a tag, which is assigned
to a new request, get released from lrb_in_use in the first clear shall
be cleared again even before the new request is actually completed. Fix
this error by removing the second clear.

CRs-Fixed: 2417820
Change-Id: I4216fa32073d2a0f0f15c0979e4dd0ad542ce684
Signed-off-by: Ziqi Chen <ziqichen@codeaurora.org>
drivers/scsi/ufs/ufshcd.c

index 707da4a..86a5bae 100644 (file)
@@ -3,7 +3,7 @@
  *
  * This code is based on drivers/scsi/ufs/ufshcd.c
  * Copyright (C) 2011-2013 Samsung India Software Operations
- * Copyright (c) 2013-2018, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2019, The Linux Foundation. All rights reserved.
  *
  * Authors:
  *     Santosh Yaraganavi <santosh.sy@samsung.com>
@@ -5611,7 +5611,6 @@ static void __ufshcd_transfer_req_compl(struct ufs_hba *hba,
                                        lrbp, cmd->request);
                        }
 
-                       clear_bit_unlock(index, &hba->lrb_in_use);
                        req = cmd->request;
                        if (req) {
                                /* Update IO svc time latency histogram */