Re: [PATCH v3 31/32] cxlflash: Fix to avoid corrupting adapter fops

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

 



> On Sep 25, 2015, at 4:23 PM, Brian King <brking@xxxxxxxxxxxxxxxxxx> wrote:
> On 09/24/2015 02:44 PM, Matthew R. Ochs wrote:
>> @@ -1293,8 +1291,8 @@ static int cxlflash_disk_attach(struct scsi_device *sdev,
>> 
>> 	int fd = -1;
>> 
>> -	/* On first attach set fileops */
>> -	if (atomic_read(&cfg->num_user_contexts) == 0)
>> +	/* On very first attach set fileops for adapter */
>> +	if (cfg->cxl_fops.owner != THIS_MODULE)
>> 		cfg->cxl_fops = cxlflash_cxl_fops;
> 
> Hmm... Why not just set this up once at probe time instead?

I tried to explain this in the commit message. I left it out of probe
time in an attempt to keep it separate from the legacy support as
it's only needed for superpipe.

I'll fix up this commit and just move it to probe as that seems easiest.


-matt
--
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