diff mbox series

[1/3] mm/zsmalloc.c: remove confusing code in obj_free()

Message ID 20210624123930.1769093-2-linmiaohe@huawei.com (mailing list archive)
State New
Headers show
Series Cleanup for zsmalloc | expand

Commit Message

Miaohe Lin June 24, 2021, 12:39 p.m. UTC
OBJ_ALLOCATED_TAG is only set for handle to indicate allocated object. It's
irrelevant with obj. So remove this misleading code to improve readability.

Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
---
 mm/zsmalloc.c | 1 -
 1 file changed, 1 deletion(-)
diff mbox series

Patch

diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index 0b0addd34ea6..1476289b619f 100644
--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -1471,7 +1471,6 @@  static void obj_free(struct size_class *class, unsigned long obj)
 	unsigned int f_objidx;
 	void *vaddr;
 
-	obj &= ~OBJ_ALLOCATED_TAG;
 	obj_to_location(obj, &f_page, &f_objidx);
 	f_offset = (class->size * f_objidx) & ~PAGE_MASK;
 	zspage = get_zspage(f_page);