All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brian King <brking@us.ibm.com>
To: James Bottomley <James.Bottomley@SteelEye.com>
Cc: Andrew Morton <akpm@osdl.org>,
	greg@kroah.com, SCSI Mailing List <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH] fix more ipr kref problems
Date: Mon, 30 Aug 2004 09:01:54 -0500	[thread overview]
Message-ID: <41333352.9060303@us.ibm.com> (raw)
In-Reply-To: <1093816265.1708.45.camel@mulgrave>

Patch looks good. Thanks.

-Brian

James Bottomley wrote:
> 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) {
> 
> 

-- 
Brian King
eServer Storage I/O
IBM Linux Technology Center


  reply	other threads:[~2004-08-30 14:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-29 21:51 [PATCH] fix more ipr kref problems James Bottomley
2004-08-30 14:01 ` Brian King [this message]
2004-08-30 17:07   ` syslog message Vladimir G. Ivanovic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=41333352.9060303@us.ibm.com \
    --to=brking@us.ibm.com \
    --cc=James.Bottomley@SteelEye.com \
    --cc=akpm@osdl.org \
    --cc=greg@kroah.com \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.