Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753890Ab3HVHZu (ORCPT ); Thu, 22 Aug 2013 03:25:50 -0400 Received: from LGEMRELSE6Q.lge.com ([156.147.1.121]:61289 "EHLO LGEMRELSE6Q.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753694Ab3HVHZt (ORCPT ); Thu, 22 Aug 2013 03:25:49 -0400 X-AuditID: 9c930179-b7c0bae0000040ac-80-5215bcfb96cc Date: Thu, 22 Aug 2013 16:25:55 +0900 From: Joonsoo Kim To: "Aneesh Kumar K.V" Cc: Andrew Morton , Rik van Riel , Mel Gorman , Michal Hocko , KAMEZAWA Hiroyuki , Hugh Dickins , Davidlohr Bueso , David Gibson , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Wanpeng Li , Naoya Horiguchi , Hillf Danton Subject: Re: [PATCH v2 11/20] mm, hugetlb: make vma_resv_map() works for all mapping type Message-ID: <20130822072555.GG13415@lge.com> References: <1376040398-11212-1-git-send-email-iamjoonsoo.kim@lge.com> <1376040398-11212-12-git-send-email-iamjoonsoo.kim@lge.com> <878uzvgwi7.fsf@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <878uzvgwi7.fsf@linux.vnet.ibm.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Brightmail-Tracker: AAAAAA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1213 Lines: 37 On Wed, Aug 21, 2013 at 04:07:36PM +0530, Aneesh Kumar K.V wrote: > Joonsoo Kim writes: > > > Util now, we get a resv_map by two ways according to each mapping type. > > This makes code dirty and unreadable. So unfiying it. > > > > Signed-off-by: Joonsoo Kim > > > > diff --git a/mm/hugetlb.c b/mm/hugetlb.c > > index 869c3e0..e6c0c77 100644 > > --- a/mm/hugetlb.c > > +++ b/mm/hugetlb.c > > @@ -421,13 +421,24 @@ void resv_map_release(struct kref *ref) > > kfree(resv_map); > > } > > > > +static inline struct resv_map *inode_resv_map(struct inode *inode) > > +{ > > + return inode->i_mapping->private_data; > > +} > > it would be nice to get have another function that will return resv_map > only if we have HPAGE_RESV_OWNER. So that we could use that in > hugetlb_vm_op_open/close. ? Otherwise It is answered in previous reply. > > Reviewed-by: Aneesh Kumar K.V Thanks. -- 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/