Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756808AbcDDU3X (ORCPT ); Mon, 4 Apr 2016 16:29:23 -0400 Received: from mail.kernel.org ([198.145.29.136]:47388 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756467AbcDDU3V (ORCPT ); Mon, 4 Apr 2016 16:29:21 -0400 MIME-Version: 1.0 In-Reply-To: <20160404201701.GA5388@lst.de> References: <1458684196-15923-6-git-send-email-mlin@kernel.org> <201603231036.A8dUuAli%fengguang.wu@intel.com> <20160404201701.GA5388@lst.de> Date: Mon, 4 Apr 2016 13:29:17 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 5/5] lib: scatterlist: move SG pool code from SCSI driver to lib/sg_pool.c From: Ming Lin To: Christoph Hellwig Cc: kbuild test robot , kbuild-all@01.org, lkml , "linux-scsi@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 713 Lines: 18 On Mon, Apr 4, 2016 at 1:17 PM, Christoph Hellwig wrote: > On Mon, Apr 04, 2016 at 01:15:45PM -0700, Ming Lin wrote: >> cleanup_sdb: >> for (i = 0; i < SG_MEMPOOL_NR; i++) { >> struct sg_pool *sgp = sg_pools + i; >> if (sgp->pool) >> mempool_destroy(sgp->pool); >> if (sgp->slab) >> kmem_cache_destroy(sgp->slab); >> } >> >> I'll keep the NULL check if no objection. > > I don't necessarily, but given that this is a code move I'd prefer > to keep the code as similar as possible in the actual move patch.. So I'll just keep it. And I can send a cleanup patch after this series applied.