From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f41.google.com (mail-pa0-f41.google.com [209.85.220.41]) by kanga.kvack.org (Postfix) with ESMTP id 6DD946B006C for ; Thu, 11 Jun 2015 04:00:52 -0400 (EDT) Received: by padev16 with SMTP id ev16so49111469pad.0 for ; Thu, 11 Jun 2015 01:00:52 -0700 (PDT) Received: from mail-pa0-x229.google.com (mail-pa0-x229.google.com. [2607:f8b0:400e:c03::229]) by mx.google.com with ESMTPS id zd13si8420348pab.169.2015.06.11.01.00.51 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Jun 2015 01:00:51 -0700 (PDT) Received: by padev16 with SMTP id ev16so49111201pad.0 for ; Thu, 11 Jun 2015 01:00:51 -0700 (PDT) Date: Thu, 11 Jun 2015 17:01:15 +0900 From: Sergey Senozhatsky Subject: Re: [PATCH 1/9] mm: Provide new get_vaddr_frames() helper Message-ID: <20150611080115.GB515@swordfish> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: owner-linux-mm@kvack.org List-ID: To: Mauro Carvalho Chehab Cc: Andrew Morton , Jan Kara , Linux Media Mailing List , Mauro Carvalho Chehab , "Kirill A. Shutemov" , Konstantin Khlebnikov , Johannes Weiner , Joonsoo Kim , Naoya Horiguchi , Cyrill Gorcunov , Christian Borntraeger , Andrea Arcangeli , Hans Verkuil , Paul Cassella , Steve Capper , "Aneesh Kumar K.V" , linux-mm@kvack.org On (06/10/15 06:20), Mauro Carvalho Chehab wrote: [..] > + > +/** > + * frame_vector_destroy() - free memory allocated to carry frame vector > + * @vec: Frame vector to free > + * > + * Free structure allocated by frame_vector_create() to carry frames. > + */ > +void frame_vector_destroy(struct frame_vector *vec) > +{ > + /* Make sure put_vaddr_frames() got called properly... */ > + VM_BUG_ON(vec->nr_frames > 0); > + if (!is_vmalloc_addr(vec)) > + kfree(vec); > + else > + vfree(vec); minor: kvfree(vec); -ss -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org