summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYiPing Xu <xuyiping@huawei.com>2016-02-18 10:48:05 +0100
committerMichal Hocko <mhocko@suse.com>2016-02-18 10:48:05 +0100
commite3eca46e1e9e39b2bbe5383a8ff752a0b5432b48 (patch)
treec69f96c0c34a595d327a03da528f050c44ac463e
parentf25fee7ec3f0d7aed97b9bc582127ba1ab506eed (diff)
zsmalloc: drop unused member 'mapping_area->huge'
When unmapping a huge class page in zs_unmap_object, the page will be unmapped by kmap_atomic. the "!area->huge" branch in __zs_unmap_object is alway true, and no code set "area->huge" now, so we can drop it. Signed-off-by: YiPing Xu <xuyiping@huawei.com> Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> Acked-by: Minchan Kim <minchan@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r--mm/zsmalloc.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index e7414cec220b..e58f0e34f9d4 100644
--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -281,7 +281,6 @@ struct mapping_area {
#endif
char *vm_addr; /* address of kmap_atomic()'ed pages */
enum zs_mapmode vm_mm; /* mapping mode */
- bool huge;
};
static int create_handle_cache(struct zs_pool *pool)
@@ -1122,11 +1121,9 @@ static void __zs_unmap_object(struct mapping_area *area,
goto out;
buf = area->vm_buf;
- if (!area->huge) {
- buf = buf + ZS_HANDLE_SIZE;
- size -= ZS_HANDLE_SIZE;
- off += ZS_HANDLE_SIZE;
- }
+ buf = buf + ZS_HANDLE_SIZE;
+ size -= ZS_HANDLE_SIZE;
+ off += ZS_HANDLE_SIZE;
sizes[0] = PAGE_SIZE - off;
sizes[1] = size - sizes[0];