mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
mm/zsmalloc.c: remove confusing code in obj_free()
Patch series "Cleanup for zsmalloc". This series contains cleanups to remove confusing code in obj_free(), combine two atomic ops and improve readability for async_free_zspage(). More details can be found in the respective changelogs. This patch (of 2): 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. Link: https://lkml.kernel.org/r/[email protected] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Miaohe Lin <[email protected]> Cc: Minchan Kim <[email protected]> Cc: Nitin Gupta <[email protected]> Cc: Sergey Senozhatsky <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
1 parent
46b76f2e09
commit
ce8475b6a4
1 file changed
-1
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user