Thread (48 messages) 48 messages, 3 authors, 2015-09-25

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

From: Brian King <hidden>
Date: 2015-09-25 21:24:06
Also in: linux-scsi

On 09/24/2015 02:44 PM, Matthew R. Ochs wrote:
quoted hunk ↗ jump to hunk
@@ -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?
 	if (attach->num_interrupts > 4) {

-- 
Brian King
Power Linux I/O
IBM Linux Technology Center
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help