From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH] hfsplus: rework processing of return value of bio_alloc() in hfsplus_submit_bio() Date: Wed, 28 Nov 2012 08:22:33 -0500 Message-ID: <20121128132233.GA30413@infradead.org> References: <1354094854.2122.44.camel@slavad-ubuntu> <20121128124851.GA31769@infradead.org> <1354108699.2017.7.camel@slavad-ubuntu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Christoph Hellwig , linux-fsdevel@vger.kernel.org, Andrew Morton , Al Viro , Hin-Tak Leung To: Vyacheslav Dubeyko Return-path: Received: from 173-166-109-252-newengland.hfc.comcastbusiness.net ([173.166.109.252]:59622 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754844Ab2K1NWf (ORCPT ); Wed, 28 Nov 2012 08:22:35 -0500 Content-Disposition: inline In-Reply-To: <1354108699.2017.7.camel@slavad-ubuntu> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Wed, Nov 28, 2012 at 05:18:19PM +0400, Vyacheslav Dubeyko wrote: > 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. :-) Check the sentence a couple lines above in the same comment: * When @bs is not NULL, if %__GFP_WAIT is set then bio_alloc will always be * able to allocate a bio. This is due to the mempool guarantees.