diff options
author | Joonsoo Kim <iamjoonsoo.kim@lge.com> | 2013-09-11 17:21:53 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-11 18:57:44 -0400 |
commit | f522c3ac00a49128115f99a5fcb95a447601c1c3 (patch) | |
tree | 638437f4666436000390efbfba81d4e4b87f649b /mm | |
parent | 4ef91848043679b272a1a5b8e2879acf696ba9e2 (diff) |
mm, hugetlb: change variable name reservations to resv
'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 <iamjoonsoo.kim@lge.com>
Reviewed-by: Aneesh Kumar <aneesh.kumar@linux.vnet.ibm.com>
Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Reviewed-by: Davidlohr Bueso <davidlohr@hp.com>
Cc: David Gibson <david@gibson.dropbear.id.au>
Cc: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Cc: Hillf Danton <dhillf@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/hugetlb.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 583db1948145..204550ae29c8 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c | |||
@@ -1115,9 +1115,9 @@ static long vma_needs_reservation(struct hstate *h, | |||
1115 | } else { | 1115 | } else { |
1116 | long err; | 1116 | long err; |
1117 | pgoff_t idx = vma_hugecache_offset(h, vma, addr); | 1117 | pgoff_t idx = vma_hugecache_offset(h, vma, addr); |
1118 | struct resv_map *reservations = vma_resv_map(vma); | 1118 | struct resv_map *resv = vma_resv_map(vma); |
1119 | 1119 | ||
1120 | err = region_chg(&reservations->regions, idx, idx + 1); | 1120 | err = region_chg(&resv->regions, idx, idx + 1); |
1121 | if (err < 0) | 1121 | if (err < 0) |
1122 | return err; | 1122 | return err; |
1123 | return 0; | 1123 | return 0; |
@@ -1135,10 +1135,10 @@ static void vma_commit_reservation(struct hstate *h, | |||
1135 | 1135 | ||
1136 | } else if (is_vma_resv_set(vma, HPAGE_RESV_OWNER)) { | 1136 | } else if (is_vma_resv_set(vma, HPAGE_RESV_OWNER)) { |
1137 | pgoff_t idx = vma_hugecache_offset(h, vma, addr); | 1137 | pgoff_t idx = vma_hugecache_offset(h, vma, addr); |
1138 | struct resv_map *reservations = vma_resv_map(vma); | 1138 | struct resv_map *resv = vma_resv_map(vma); |
1139 | 1139 | ||
1140 | /* Mark this page used in the map. */ | 1140 | /* Mark this page used in the map. */ |
1141 | region_add(&reservations->regions, idx, idx + 1); | 1141 | region_add(&resv->regions, idx, idx + 1); |
1142 | } | 1142 | } |
1143 | } | 1143 | } |
1144 | 1144 | ||
@@ -2188,7 +2188,7 @@ out: | |||
2188 | 2188 | ||
2189 | static void hugetlb_vm_op_open(struct vm_area_struct *vma) | 2189 | static void hugetlb_vm_op_open(struct vm_area_struct *vma) |
2190 | { | 2190 | { |
2191 | struct resv_map *reservations = vma_resv_map(vma); | 2191 | struct resv_map *resv = vma_resv_map(vma); |
2192 | 2192 | ||
2193 | /* | 2193 | /* |
2194 | * This new VMA should share its siblings reservation map if present. | 2194 | * This new VMA should share its siblings reservation map if present. |
@@ -2198,34 +2198,34 @@ static void hugetlb_vm_op_open(struct vm_area_struct *vma) | |||
2198 | * after this open call completes. It is therefore safe to take a | 2198 | * after this open call completes. It is therefore safe to take a |
2199 | * new reference here without additional locking. | 2199 | * new reference here without additional locking. |
2200 | */ | 2200 | */ |
2201 | if (reservations) | 2201 | if (resv) |
2202 | kref_get(&reservations->refs); | 2202 | kref_get(&resv->refs); |
2203 | } | 2203 | } |
2204 | 2204 | ||
2205 | static void resv_map_put(struct vm_area_struct *vma) | 2205 | static void resv_map_put(struct vm_area_struct *vma) |
2206 | { | 2206 | { |
2207 | struct resv_map *reservations = vma_resv_map(vma); | 2207 | struct resv_map *resv = vma_resv_map(vma); |
2208 | 2208 | ||
2209 | if (!reservations) | 2209 | if (!resv) |
2210 | return; | 2210 | return; |
2211 | kref_put(&reservations->refs, resv_map_release); | 2211 | kref_put(&resv->refs, resv_map_release); |
2212 | } | 2212 | } |
2213 | 2213 | ||
2214 | static void hugetlb_vm_op_close(struct vm_area_struct *vma) | 2214 | static void hugetlb_vm_op_close(struct vm_area_struct *vma) |
2215 | { | 2215 | { |
2216 | struct hstate *h = hstate_vma(vma); | 2216 | struct hstate *h = hstate_vma(vma); |
2217 | struct resv_map *reservations = vma_resv_map(vma); | 2217 | struct resv_map *resv = vma_resv_map(vma); |
2218 | struct hugepage_subpool *spool = subpool_vma(vma); | 2218 | struct hugepage_subpool *spool = subpool_vma(vma); |
2219 | unsigned long reserve; | 2219 | unsigned long reserve; |
2220 | unsigned long start; | 2220 | unsigned long start; |
2221 | unsigned long end; | 2221 | unsigned long end; |
2222 | 2222 | ||
2223 | if (reservations) { | 2223 | if (resv) { |
2224 | start = vma_hugecache_offset(h, vma, vma->vm_start); | 2224 | start = vma_hugecache_offset(h, vma, vma->vm_start); |
2225 | end = vma_hugecache_offset(h, vma, vma->vm_end); | 2225 | end = vma_hugecache_offset(h, vma, vma->vm_end); |
2226 | 2226 | ||
2227 | reserve = (end - start) - | 2227 | reserve = (end - start) - |
2228 | region_count(&reservations->regions, start, end); | 2228 | region_count(&resv->regions, start, end); |
2229 | 2229 | ||
2230 | resv_map_put(vma); | 2230 | resv_map_put(vma); |
2231 | 2231 | ||