Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752284AbbERG7G (ORCPT ); Mon, 18 May 2015 02:59:06 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50957 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751794AbbERG7A convert rfc822-to-8bit (ORCPT ); Mon, 18 May 2015 02:59:00 -0400 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Subject: Re: [PATCH 05/14] ceph: Use kvfree() in ceph_put_page_vector() From: "Yan, Zheng" In-Reply-To: <1431714923-23028-5-git-send-email-penberg@kernel.org> Date: Mon, 18 May 2015 14:58:39 +0800 Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org, Sage Weil Content-Transfer-Encoding: 8BIT Message-Id: <63A5FA39-A674-49A3-BA13-ECA7D3DABB4B@redhat.com> References: <1431714923-23028-1-git-send-email-penberg@kernel.org> <1431714923-23028-5-git-send-email-penberg@kernel.org> To: Pekka Enberg Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1102 Lines: 40 > On May 16, 2015, at 02:35, Pekka Enberg wrote: > > Use kvfree instead of open-coding it. > > Cc: "Yan, Zheng" > Cc: Sage Weil > Signed-off-by: Pekka Enberg > --- > net/ceph/pagevec.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/net/ceph/pagevec.c b/net/ceph/pagevec.c > index 096d914..d4f5f22 100644 > --- a/net/ceph/pagevec.c > +++ b/net/ceph/pagevec.c > @@ -51,10 +51,7 @@ void ceph_put_page_vector(struct page **pages, int num_pages, bool dirty) > set_page_dirty_lock(pages[i]); > put_page(pages[i]); > } > - if (is_vmalloc_addr(pages)) > - vfree(pages); > - else > - kfree(pages); > + kvfree(pages); > } > EXPORT_SYMBOL(ceph_put_page_vector); Thanks. but Ilya Dryomov has already submitted a similar patch. > > -- > 2.1.0 > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/