All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vyacheslav Dubeyko <slava@dubeyko.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-fsdevel@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Al Viro <viro@zeniv.linux.org.uk>,
	Hin-Tak Leung <htl10@users.sourceforge.net>
Subject: Re: [PATCH] hfsplus: rework processing of return value of bio_alloc() in hfsplus_submit_bio()
Date: Wed, 28 Nov 2012 17:18:19 +0400	[thread overview]
Message-ID: <1354108699.2017.7.camel@slavad-ubuntu> (raw)
In-Reply-To: <20121128124851.GA31769@infradead.org>

On Wed, 2012-11-28 at 07:48 -0500, Christoph Hellwig wrote:
> On Wed, Nov 28, 2012 at 01:27:34PM +0400, Vyacheslav Dubeyko wrote:
> > Hi,
> > 
> > This patch adds logic of checking return value of bio_alloc() in hfsplus_submit_bio(). In the case of NULL the hfsplus_submit_bio() returns -EIO.
> 
> bio_alloc does a mempool allocation and thus will never return NULL.
> 

I don't insist on the patch. But if the function has such description:

 *   RETURNS:
 *   Pointer to new bio on success, NULL on failure.

I prefer to check on NULL anyway. :-)

With the best regards,
Vyacheslav Dubeyko.

> --
> To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



  reply	other threads:[~2012-11-28 13:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-28  9:27 [PATCH] hfsplus: rework processing of return value of bio_alloc() in hfsplus_submit_bio() Vyacheslav Dubeyko
2012-11-28 12:48 ` Christoph Hellwig
2012-11-28 13:18   ` Vyacheslav Dubeyko [this message]
2012-11-28 13:22     ` Christoph Hellwig
2012-11-28 13:37       ` Vyacheslav Dubeyko

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=1354108699.2017.7.camel@slavad-ubuntu \
    --to=slava@dubeyko.com \
    --cc=akpm@linux-foundation.org \
    --cc=hch@infradead.org \
    --cc=htl10@users.sourceforge.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    /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.