Re: [PATCHv2 08/22] scsi_dh_alua: use unique device id

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

 



> +struct alua_port_group *alua_lookup_pg(char *id_str, size_t id_size,
> +				       int group_id)

Not too important, but I would have preferred alua_find_get_pg here.

> +{
> +	struct alua_port_group *pg;
> +
> +	list_for_each_entry(pg, &port_group_list, node) {
> +		if (pg->group_id != group_id)
> +			continue;
> +		if (pg->device_id_len != id_size)
> +			continue;
> +		if (strncmp(pg->device_id_str, id_str, id_size))
> +			continue;
> +		kref_get(&pg->kref);

This needs to be a kref_get_unless_zero
--
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