Re: [PATCH 03/12] target/configfs: Convert mappedlun + SCSI MIBs to RCU reader

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2015-05-12 at 13:58 -0700, Andy Grover wrote:
> On 05/12/2015 02:25 AM, Nicholas A. Bellinger wrote:
> > From: Nicholas Bellinger <nab@xxxxxxxxxxxxxxx>
> >
> > This patch converts fabric independent configfs link/unlink to use
> > RCU read path macros for se_node_acl->lun_entry_hlist access.
> >
> > It also converts SCSI MIB configfs show attribute code to use
> > RCU read path macros for se_node_acl->lun_entry_hlist access.
> >
> > Cc: Hannes Reinecke <hare@xxxxxxx>
> > Cc: Christoph Hellwig <hch@xxxxxx>
> > Cc: Sagi Grimberg <sagig@xxxxxxxxxxxx>
> > Signed-off-by: Nicholas Bellinger <nab@xxxxxxxxxxxxxxx>
> > ---
> >   drivers/target/target_core_fabric_configfs.c |  35 +++---
> >   drivers/target/target_core_stat.c            | 180 +++++++++++++--------------
> >   2 files changed, 110 insertions(+), 105 deletions(-)
> >
> > diff --git a/drivers/target/target_core_fabric_configfs.c b/drivers/target/target_core_fabric_configfs.c
> > index 6cb4828..0dab6d5 100644
> > --- a/drivers/target/target_core_fabric_configfs.c
> > +++ b/drivers/target/target_core_fabric_configfs.c
> > @@ -123,16 +123,16 @@ static int target_fabric_mappedlun_link(
> >   	 * which be will write protected (READ-ONLY) when
> >   	 * tpg_1/attrib/demo_mode_write_protect=1
> >   	 */
> > -	spin_lock_irq(&lacl->se_lun_nacl->device_list_lock);
> > -	deve = lacl->se_lun_nacl->device_list[lacl->mapped_lun];
> > -	if (deve->lun_flags & TRANSPORT_LUNFLAGS_INITIATOR_ACCESS)
> > +	rcu_read_lock();
> > +	deve = target_nacl_find_deve(lacl->se_lun_nacl, lacl->mapped_lun);
> > +	if (deve && deve->lun_flags & TRANSPORT_LUNFLAGS_INITIATOR_ACCESS)
> 
> Why do we still need TRANSPORT_LUNFLAGS_INITIATOR_ACCESS? Isn't deve 
> being not-NULL enough?
> 

Yep, I think this can go as well.  Dropping now.

--nab

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux