From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx197.postini.com [74.125.245.197]) by kanga.kvack.org (Postfix) with SMTP id E83956B0033 for ; Tue, 30 Jul 2013 12:51:00 -0400 (EDT) Received: from /spool/local by e28smtp03.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 30 Jul 2013 22:13:52 +0530 Received: from d28relay03.in.ibm.com (d28relay03.in.ibm.com [9.184.220.60]) by d28dlp03.in.ibm.com (Postfix) with ESMTP id 98CD51258056 for ; Tue, 30 Jul 2013 22:20:22 +0530 (IST) Received: from d28av03.in.ibm.com (d28av03.in.ibm.com [9.184.220.65]) by d28relay03.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r6UGprtD43253780 for ; Tue, 30 Jul 2013 22:21:53 +0530 Received: from d28av03.in.ibm.com (loopback [127.0.0.1]) by d28av03.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r6UGopb5020899 for ; Wed, 31 Jul 2013 02:50:52 +1000 From: "Aneesh Kumar K.V" Subject: Re: [PATCH 02/18] mm, hugetlb: change variable name reservations to resv In-Reply-To: <1375075929-6119-3-git-send-email-iamjoonsoo.kim@lge.com> References: <1375075929-6119-1-git-send-email-iamjoonsoo.kim@lge.com> <1375075929-6119-3-git-send-email-iamjoonsoo.kim@lge.com> Date: Tue, 30 Jul 2013 22:20:51 +0530 Message-ID: <87zjt4outw.fsf@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain Sender: owner-linux-mm@kvack.org List-ID: To: Joonsoo Kim , Andrew Morton Cc: Rik van Riel , Mel Gorman , Michal Hocko , KAMEZAWA Hiroyuki , Hugh Dickins , Davidlohr Bueso , David Gibson , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Joonsoo Kim , Wanpeng Li , Naoya Horiguchi , Hillf Danton Joonsoo Kim writes: > 'reservations' is so long name as a variable and we use 'resv_map' > to represent 'struct resv_map' in other place. To reduce confusion and > unreadability, change it. > > Signed-off-by: Joonsoo Kim Reviewed-by: Aneesh Kumar > > diff --git a/mm/hugetlb.c b/mm/hugetlb.c > index d971233..12b6581 100644 > --- a/mm/hugetlb.c > +++ b/mm/hugetlb.c > @@ -1095,9 +1095,9 @@ static long vma_needs_reservation(struct hstate *h, > } else { > long err; > pgoff_t idx = vma_hugecache_offset(h, vma, addr); > - struct resv_map *reservations = vma_resv_map(vma); > + struct resv_map *resv = vma_resv_map(vma); > > - err = region_chg(&reservations->regions, idx, idx + 1); > + err = region_chg(&resv->regions, idx, idx + 1); > if (err < 0) > return err; > return 0; > @@ -1115,10 +1115,10 @@ static void vma_commit_reservation(struct hstate *h, > > } else if (is_vma_resv_set(vma, HPAGE_RESV_OWNER)) { > pgoff_t idx = vma_hugecache_offset(h, vma, addr); > - struct resv_map *reservations = vma_resv_map(vma); > + struct resv_map *resv = vma_resv_map(vma); > > /* Mark this page used in the map. */ > - region_add(&reservations->regions, idx, idx + 1); > + region_add(&resv->regions, idx, idx + 1); > } > } > > @@ -2168,7 +2168,7 @@ out: > > static void hugetlb_vm_op_open(struct vm_area_struct *vma) > { > - struct resv_map *reservations = vma_resv_map(vma); > + struct resv_map *resv = vma_resv_map(vma); > > /* > * This new VMA should share its siblings reservation map if present. > @@ -2178,34 +2178,34 @@ static void hugetlb_vm_op_open(struct vm_area_struct *vma) > * after this open call completes. It is therefore safe to take a > * new reference here without additional locking. > */ > - if (reservations) > - kref_get(&reservations->refs); > + if (resv) > + kref_get(&resv->refs); > } > > static void resv_map_put(struct vm_area_struct *vma) > { > - struct resv_map *reservations = vma_resv_map(vma); > + struct resv_map *resv = vma_resv_map(vma); > > - if (!reservations) > + if (!resv) > return; > - kref_put(&reservations->refs, resv_map_release); > + kref_put(&resv->refs, resv_map_release); > } > > static void hugetlb_vm_op_close(struct vm_area_struct *vma) > { > struct hstate *h = hstate_vma(vma); > - struct resv_map *reservations = vma_resv_map(vma); > + struct resv_map *resv = vma_resv_map(vma); > struct hugepage_subpool *spool = subpool_vma(vma); > unsigned long reserve; > unsigned long start; > unsigned long end; > > - if (reservations) { > + if (resv) { > start = vma_hugecache_offset(h, vma, vma->vm_start); > end = vma_hugecache_offset(h, vma, vma->vm_end); > > reserve = (end - start) - > - region_count(&reservations->regions, start, end); > + region_count(&resv->regions, start, end); > > resv_map_put(vma); > > -- > 1.7.9.5 -- 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