All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boaz Harrosh <bharrosh@panasas.com>
To: "James E.J. Bottomley" <James.Bottomley@suse.de>
Cc: Dan Carpenter <error27@gmail.com>,
	Benny Halevy <bhalevy@panasas.com>,
	osd-dev@open-osd.org, linux-scsi@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: Re: [patch] scsi/osd: checking NULL instead of ERR_PTR()
Date: Sun, 21 Nov 2010 10:31:44 +0000	[thread overview]
Message-ID: <4CE8F510.3090801@panasas.com> (raw)
In-Reply-To: <4CDFE6A9.10704@panasas.com>

On 11/14/2010 03:39 PM, Boaz Harrosh wrote:
> On 11/12/2010 06:31 AM, Dan Carpenter wrote:
>> bio_map_kern() returns ERR_PTRs on failure and never returns NULL.
>>
>> Signed-off-by: Dan Carpenter <error27@gmail.com>
>>
> 
> Acked-by: Boaz Harrosh <bharrosh@panasas.com>
> 

James! Please submit this patch for scsi-rc-fixes. It is an important
fix for code that went into this merge window.

Thanks
Boaz

>> diff --git a/drivers/scsi/osd/osd_initiator.c b/drivers/scsi/osd/osd_initiator.c
>> index 0433ea6..b798919 100644
>> --- a/drivers/scsi/osd/osd_initiator.c
>> +++ b/drivers/scsi/osd/osd_initiator.c
>> @@ -951,8 +951,8 @@ static int _osd_req_finalize_cdb_cont(struct osd_request *or, const u8 *cap_key)
>>  	/* create a bio for continuation segment */
>>  	bio = bio_map_kern(req_q, or->cdb_cont.buff, or->cdb_cont.total_bytes,
>>  			   GFP_KERNEL);
>> -	if (unlikely(!bio))
>> -		return -ENOMEM;
>> +	if (unlikely(IS_ERR(bio)))
>> +		return PTR_ERR(bio);
>>  
>>  	bio->bi_rw |= REQ_WRITE;
>>  
> 
> Wahoo, good catch, thanks! This is new code in 2.6.37-rc1. It should be pushed
> for current Kernel.
> 
> James: please apply to scsi-rc-fixes for the next round of fixes?
> 
> Thanks
> Boaz


WARNING: multiple messages have this Message-ID (diff)
From: Boaz Harrosh <bharrosh@panasas.com>
To: "James E.J. Bottomley" <James.Bottomley@suse.de>
Cc: Dan Carpenter <error27@gmail.com>,
	Benny Halevy <bhalevy@panasas.com>,
	osd-dev@open-osd.org, linux-scsi@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: Re: [patch] scsi/osd: checking NULL instead of ERR_PTR()
Date: Sun, 21 Nov 2010 12:31:44 +0200	[thread overview]
Message-ID: <4CE8F510.3090801@panasas.com> (raw)
In-Reply-To: <4CDFE6A9.10704@panasas.com>

On 11/14/2010 03:39 PM, Boaz Harrosh wrote:
> On 11/12/2010 06:31 AM, Dan Carpenter wrote:
>> bio_map_kern() returns ERR_PTRs on failure and never returns NULL.
>>
>> Signed-off-by: Dan Carpenter <error27@gmail.com>
>>
> 
> Acked-by: Boaz Harrosh <bharrosh@panasas.com>
> 

James! Please submit this patch for scsi-rc-fixes. It is an important
fix for code that went into this merge window.

Thanks
Boaz

>> diff --git a/drivers/scsi/osd/osd_initiator.c b/drivers/scsi/osd/osd_initiator.c
>> index 0433ea6..b798919 100644
>> --- a/drivers/scsi/osd/osd_initiator.c
>> +++ b/drivers/scsi/osd/osd_initiator.c
>> @@ -951,8 +951,8 @@ static int _osd_req_finalize_cdb_cont(struct osd_request *or, const u8 *cap_key)
>>  	/* create a bio for continuation segment */
>>  	bio = bio_map_kern(req_q, or->cdb_cont.buff, or->cdb_cont.total_bytes,
>>  			   GFP_KERNEL);
>> -	if (unlikely(!bio))
>> -		return -ENOMEM;
>> +	if (unlikely(IS_ERR(bio)))
>> +		return PTR_ERR(bio);
>>  
>>  	bio->bi_rw |= REQ_WRITE;
>>  
> 
> Wahoo, good catch, thanks! This is new code in 2.6.37-rc1. It should be pushed
> for current Kernel.
> 
> James: please apply to scsi-rc-fixes for the next round of fixes?
> 
> Thanks
> Boaz


  reply	other threads:[~2010-11-21 10:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-12  4:31 [patch] scsi/osd: checking NULL instead of ERR_PTR() Dan Carpenter
2010-11-12  4:31 ` Dan Carpenter
2010-11-14 13:39 ` Boaz Harrosh
2010-11-14 13:39   ` Boaz Harrosh
2010-11-21 10:31   ` Boaz Harrosh [this message]
2010-11-21 10:31     ` Boaz Harrosh
2010-11-30 10:22     ` Boaz Harrosh
2010-11-30 10:22       ` Boaz Harrosh

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=4CE8F510.3090801@panasas.com \
    --to=bharrosh@panasas.com \
    --cc=James.Bottomley@suse.de \
    --cc=bhalevy@panasas.com \
    --cc=error27@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=osd-dev@open-osd.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.