All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fix more ipr kref problems
@ 2004-08-29 21:51 James Bottomley
  2004-08-30 14:01 ` Brian King
  0 siblings, 1 reply; 3+ messages in thread
From: James Bottomley @ 2004-08-29 21:51 UTC (permalink / raw)
  To: Brian King, Andrew Morton, greg; +Cc: SCSI Mailing List

This was caused by

KREF: make kref_get() return void as it makes sense to do so.
  
drivers/scsi/ipr.c: In function `ipr_worker_thread':
drivers/scsi/ipr.c:1825: error: wrong type argument to unary exclamation
mark
make[2]: *** [drivers/scsi/ipr.o] Error 1

The fix is fairly simple.

James

===== drivers/scsi/ipr.c 1.25 vs edited =====
--- 1.25/drivers/scsi/ipr.c	2004-08-16 01:40:17 -05:00
+++ edited/drivers/scsi/ipr.c	2004-08-29 16:25:31 -05:00
@@ -1822,10 +1822,11 @@
 
 	if (ioa_cfg->sdt_state == GET_DUMP) {
 		dump = ioa_cfg->dump;
-		if (!dump || !kref_get(&dump->kref)) {
+		if (!dump) {
 			spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags);
 			return;
 		}
+		kref_get(&dump->kref);
 		spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags);
 		ipr_get_ioa_dump(ioa_cfg, dump);
 		kref_put(&dump->kref, ipr_release_dump);
@@ -2423,11 +2424,11 @@
 	spin_lock_irqsave(ioa_cfg->host->host_lock, lock_flags);
 	dump = ioa_cfg->dump;
 
-	if (ioa_cfg->sdt_state != DUMP_OBTAINED || !dump || !kref_get(&dump->kref)) {
+	if (ioa_cfg->sdt_state != DUMP_OBTAINED || !dump) {
 		spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags);
 		return 0;
 	}
-
+	kref_get(&dump->kref);
 	spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags);
 
 	if (off > dump->driver_dump.hdr.len) {


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-08-30 17:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-29 21:51 [PATCH] fix more ipr kref problems James Bottomley
2004-08-30 14:01 ` Brian King
2004-08-30 17:07   ` syslog message Vladimir G. Ivanovic

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.