From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx193.postini.com [74.125.245.193]) by kanga.kvack.org (Postfix) with SMTP id 20CD76B0033 for ; Thu, 22 Aug 2013 02:53:27 -0400 (EDT) Date: Thu, 22 Aug 2013 15:53:33 +0900 From: Joonsoo Kim Subject: Re: [PATCH v2 07/20] mm, hugetlb: unify region structure handling Message-ID: <20130822065333.GC13415@lge.com> References: <1376040398-11212-1-git-send-email-iamjoonsoo.kim@lge.com> <1376040398-11212-8-git-send-email-iamjoonsoo.kim@lge.com> <87bo4rgx6m.fsf@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87bo4rgx6m.fsf@linux.vnet.ibm.com> Sender: owner-linux-mm@kvack.org List-ID: 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 On Wed, Aug 21, 2013 at 03:52:57PM +0530, Aneesh Kumar K.V wrote: > Joonsoo Kim writes: > > > Currently, to track a reserved and allocated region, we use two different > > ways for MAP_SHARED and MAP_PRIVATE. For MAP_SHARED, we use > > address_mapping's private_list and, for MAP_PRIVATE, we use a resv_map. > > Now, we are preparing to change a coarse grained lock which protect > > a region structure to fine grained lock, and this difference hinder it. > > So, before changing it, unify region structure handling. > > > > Signed-off-by: Joonsoo Kim > > > > diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c > > index a3f868a..9bf2c4a 100644 > > --- a/fs/hugetlbfs/inode.c > > +++ b/fs/hugetlbfs/inode.c > > @@ -366,7 +366,12 @@ static void truncate_hugepages(struct inode *inode, loff_t lstart) > > > > static void hugetlbfs_evict_inode(struct inode *inode) > > { > > + struct resv_map *resv_map; > > + > > truncate_hugepages(inode, 0); > > + resv_map = (struct resv_map *)inode->i_mapping->private_data; > > can you add a comment around saying root inode doesn't have resv_map. Okay! I will do it. Thanks. -- 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