linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Miaohe Lin <linmiaohe@huawei.com>
To: <akpm@linux-foundation.org>, <minchan@kernel.org>, <ngupta@vflare.org>
Cc: <senozhatsky@chromium.org>, <linux-kernel@vger.kernel.org>,
	<linux-mm@kvack.org>, <linmiaohe@huawei.com>
Subject: [PATCH 1/3] mm/zsmalloc.c: remove confusing code in obj_free()
Date: Thu, 24 Jun 2021 20:39:28 +0800	[thread overview]
Message-ID: <20210624123930.1769093-2-linmiaohe@huawei.com> (raw)
In-Reply-To: <20210624123930.1769093-1-linmiaohe@huawei.com>

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 --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);
-- 
2.23.0



  reply	other threads:[~2021-06-24 12:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-24 12:39 [PATCH 0/3] Cleanup for zsmalloc Miaohe Lin
2021-06-24 12:39 ` Miaohe Lin [this message]
2021-06-24 12:39 ` [PATCH 2/3] mm/zsmalloc.c: combine two atomic ops in zs_pool_dec_isolated() Miaohe Lin
2021-06-25  5:01   ` [Phishing Risk] [External] " Muchun Song
2021-06-25  6:32     ` Miaohe Lin
2021-06-25  7:29       ` Muchun Song
2021-06-25  8:46         ` Miaohe Lin
2021-06-25  9:32           ` Miaohe Lin
2021-06-25 10:40             ` Muchun Song
2021-07-01  2:43               ` Miaohe Lin
2021-06-24 12:39 ` [PATCH 3/3] mm/zsmalloc.c: improve readability for async_free_zspage() Miaohe Lin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210624123930.1769093-2-linmiaohe@huawei.com \
    --to=linmiaohe@huawei.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=minchan@kernel.org \
    --cc=ngupta@vflare.org \
    --cc=senozhatsky@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox