Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1423143AbdDUSbL (ORCPT ); Fri, 21 Apr 2017 14:31:11 -0400 Received: from mail-vk0-f67.google.com ([209.85.213.67]:34257 "EHLO mail-vk0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1040151AbdDUSbB (ORCPT ); Fri, 21 Apr 2017 14:31:01 -0400 MIME-Version: 1.0 In-Reply-To: <149266673005.27388.9415706764616504556.stgit@noble> References: <149266645258.27388.14083229348123176454.stgit@noble> <149266673005.27388.9415706764616504556.stgit@noble> From: Ming Lei Date: Fri, 21 Apr 2017 23:41:18 +0800 Message-ID: Subject: Re: [PATCH 09/11] bcache: use kmalloc to allocate bio in bch_data_verify() To: NeilBrown Cc: Jens Axboe , linux-block , Linux Kernel Mailing List , Kent Overstreet , "open list:BCACHE (BLOCK LAYER CACHE)" 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: 534 Lines: 18 On Thu, Apr 20, 2017 at 1:38 PM, NeilBrown wrote: > This function allocates a bio, then a collection > of pages. It copes with failure. > > It currently uses a mempool() to allocate the bio, > but alloc_page() to allocate the pages. These fail > in different ways, so the usage is inconsistent. > > Change the bio_clone() to bio_clone_kmalloc() > so that no pool is used either for the bio or the pages. > > Signed-off-by: NeilBrown Reviewed-by : Ming Lei Thanks, Ming Lei