diff options
| author | 2021-12-13 10:48:46 +0100 | |
|---|---|---|
| committer | 2021-12-13 10:48:46 +0100 | |
| commit | 6773cc31a9bb5122fd5c288f73ca006ad20a6c17 (patch) | |
| tree | 730ec8bcc0a5ddd5030268bb3ffd4945d34728c1 /drivers/target/target_core_spc.c | |
| parent | futex: Fix additional regressions (diff) | |
| parent | Linux 5.16-rc5 (diff) | |
| download | wireguard-linux-6773cc31a9bb5122fd5c288f73ca006ad20a6c17.tar.xz wireguard-linux-6773cc31a9bb5122fd5c288f73ca006ad20a6c17.zip | |
Merge tag 'v5.16-rc5' into locking/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/target/target_core_spc.c')
| -rw-r--r-- | drivers/target/target_core_spc.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/target/target_core_spc.c b/drivers/target/target_core_spc.c index 22703a0dbd07..4c76498d3fb0 100644 --- a/drivers/target/target_core_spc.c +++ b/drivers/target/target_core_spc.c @@ -40,11 +40,11 @@ static void spc_fill_alua_data(struct se_lun *lun, unsigned char *buf) * * See spc4r17 section 6.4.2 Table 135 */ - spin_lock(&lun->lun_tg_pt_gp_lock); - tg_pt_gp = lun->lun_tg_pt_gp; + rcu_read_lock(); + tg_pt_gp = rcu_dereference(lun->lun_tg_pt_gp); if (tg_pt_gp) buf[5] |= tg_pt_gp->tg_pt_gp_alua_access_type; - spin_unlock(&lun->lun_tg_pt_gp_lock); + rcu_read_unlock(); } static u16 @@ -325,14 +325,14 @@ check_t10_vend_desc: * Get the PROTOCOL IDENTIFIER as defined by spc4r17 * section 7.5.1 Table 362 */ - spin_lock(&lun->lun_tg_pt_gp_lock); - tg_pt_gp = lun->lun_tg_pt_gp; + rcu_read_lock(); + tg_pt_gp = rcu_dereference(lun->lun_tg_pt_gp); if (!tg_pt_gp) { - spin_unlock(&lun->lun_tg_pt_gp_lock); + rcu_read_unlock(); goto check_lu_gp; } tg_pt_gp_id = tg_pt_gp->tg_pt_gp_id; - spin_unlock(&lun->lun_tg_pt_gp_lock); + rcu_read_unlock(); buf[off] = tpg->proto_id << 4; buf[off++] |= 0x1; /* CODE SET == Binary */ |
