From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752084AbcGRKNj (ORCPT ); Mon, 18 Jul 2016 06:13:39 -0400 Received: from mail-pa0-f68.google.com ([209.85.220.68]:32794 "EHLO mail-pa0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751499AbcGRKNh (ORCPT ); Mon, 18 Jul 2016 06:13:37 -0400 Date: Mon, 18 Jul 2016 02:13:33 -0800 From: Kent Overstreet To: Johannes Thumshirn Cc: Jens Axboe , Eric Wheeler , Coly Li , linux-bcache@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] bcache: untagle cache_aolloc Message-ID: <20160718101333.GA18961@kmo-pixel> References: <1468836669-1136-1-git-send-email-jthumshirn@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1468836669-1136-1-git-send-email-jthumshirn@suse.de> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 18, 2016 at 12:11:09PM +0200, Johannes Thumshirn wrote: > bcache's cache_alloc() function currenty has no way freeing memory if one of > the allocations fails. Untangle the if + allocation statement so we have > defined checkpoints to free previous allocations if one fails. nack. The existing error path handles failure midway through just fine.