Message ID | 20211012180148.1669685-11-hannes@cmpxchg.org (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <SRS0=+gpB=PA=kvack.org=owner-linux-mm@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8238DC433EF for <linux-mm@archiver.kernel.org>; Tue, 12 Oct 2021 18:02:18 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 31FC960D07 for <linux-mm@archiver.kernel.org>; Tue, 12 Oct 2021 18:02:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 31FC960D07 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=cmpxchg.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id C48D2940010; Tue, 12 Oct 2021 14:02:02 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BD2D3940007; Tue, 12 Oct 2021 14:02:02 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9FC72940010; Tue, 12 Oct 2021 14:02:02 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0105.hostedemail.com [216.40.44.105]) by kanga.kvack.org (Postfix) with ESMTP id 9150D940007 for <linux-mm@kvack.org>; Tue, 12 Oct 2021 14:02:02 -0400 (EDT) Received: from smtpin25.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 588A21834336F for <linux-mm@kvack.org>; Tue, 12 Oct 2021 18:02:02 +0000 (UTC) X-FDA: 78688554084.25.7676ED8 Received: from mail-qt1-f174.google.com (mail-qt1-f174.google.com [209.85.160.174]) by imf10.hostedemail.com (Postfix) with ESMTP id 067FF6001999 for <linux-mm@kvack.org>; Tue, 12 Oct 2021 18:02:01 +0000 (UTC) Received: by mail-qt1-f174.google.com with SMTP id w8so163894qts.4 for <linux-mm@kvack.org>; Tue, 12 Oct 2021 11:02:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=5lvw5Qkq1aYtQrdDyynEw7+1fb+LBtUMWle5QZBxmmc=; b=ZRxAa3dCUIQ/2t2A5bfPUBO8+qsrLWcdjgBysmSz2hHYKrWWA4F0s4IpOR036raCEC 9NXiSvCs1tTgg7nSbEwvLytFT3p8aeclNnkTRgSYbvuGXeOI5RggN9r2XlJBapTCy6k6 wflt913blZ8EukxCzpHwbZfU0RjgzaERvpGVArHj+ZVzfRWLLMGKWqWQz6VdHYO3yRRb RsyJDpGVkl88h4tLRrtNYBzQJK8hZEeVFfkQrCrySOBcj75PPMeMv0eQUF02ScpNIFlX IhVkvf+hBAf10AJv+XiKYEfzsd3TLuSXS90GMuAkx+qwVECwOSYxozbpL8MTPxjqffoX QUXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5lvw5Qkq1aYtQrdDyynEw7+1fb+LBtUMWle5QZBxmmc=; b=gES9K5x+Zuy7zPgNo3aXHripRkUr5ZSZ9ZKHf9JbvnD3oW9UbJ5cyI7Q1iGsMHMEbO zLsbuxCmAeoyDZ3Aef5qYstp0W7DIybEk/e+FZG6iI6sbvFan8YvvJbgAYYyzF+ODPZC 1OhqzqbNNYItb76eeZv4KOP6Muk8ZmUdeic5wh/zOCItBpsjUby8Fk+4pjjstDhn8G03 P6M7QzO57UYnCsKYKB/XfFI3bp6crIg03jo+UkF8D0vqLduvBs2gU3hosR8fHTJIZMJK B3BNILtWwMN2VKrbrMOC7En440OtjoYleIbcVl8cAkx/o0oU3OI9BScciyYkyD81Qpm4 GTkQ== X-Gm-Message-State: AOAM530957mP/GwntqlAYvChfrpeHewkZJYYC1aEJLR5AYsWoJTR5WbF EenD3mhmTasw2WT/g2f1a1X5JAb3uX7gqQ== X-Google-Smtp-Source: ABdhPJyN0BoLusx+W7Z8FkZAXpS+c+bgMpYmaXYb4NUw/SQe981ABNR1OzmuWw0cbmEILaHzL0SOQA== X-Received: by 2002:ac8:705d:: with SMTP id y29mr24210129qtm.73.1634061721311; Tue, 12 Oct 2021 11:02:01 -0700 (PDT) Received: from localhost (cpe-98-15-154-102.hvc.res.rr.com. [98.15.154.102]) by smtp.gmail.com with ESMTPSA id m17sm6876285qtx.62.2021.10.12.11.02.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 11:02:01 -0700 (PDT) From: Johannes Weiner <hannes@cmpxchg.org> To: linux-mm@kvack.org Cc: Matthew Wilcox <willy@infradead.org>, Kent Overstreet <kent.overstreet@gmail.com>, "Kirill A. Shutemov" <kirill@shutemov.name>, Vlastimil Babka <vbabka@suse.cz>, Michal Hocko <mhocko@suse.com>, Roman Gushchin <guro@fb.com>, linux-kernel@vger.kernel.org, kernel-team@fb.com Subject: [PATCH 10/11] PageSlab: eliminate unnecessary compound_head() call in mm/usercopy Date: Tue, 12 Oct 2021 14:01:47 -0400 Message-Id: <20211012180148.1669685-11-hannes@cmpxchg.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211012180148.1669685-1-hannes@cmpxchg.org> References: <20211012180148.1669685-1-hannes@cmpxchg.org> MIME-Version: 1.0 X-Rspamd-Queue-Id: 067FF6001999 X-Stat-Signature: ka5ikjef6pqqbjjp8ti9sj9zmki5trp3 Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=cmpxchg-org.20210112.gappssmtp.com header.s=20210112 header.b=ZRxAa3dC; spf=pass (imf10.hostedemail.com: domain of hannes@cmpxchg.org designates 209.85.160.174 as permitted sender) smtp.mailfrom=hannes@cmpxchg.org; dmarc=pass (policy=none) header.from=cmpxchg.org X-Rspamd-Server: rspam06 X-HE-Tag: 1634061721-135010 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> |
Series |
PageSlab: eliminate unnecessary compound_head() calls
|
expand
|
diff --git a/mm/usercopy.c b/mm/usercopy.c index 924e236522da..b3de3c4eefba 100644 --- a/mm/usercopy.c +++ b/mm/usercopy.c @@ -235,7 +235,7 @@ static inline void check_heap_object(const void *ptr, unsigned long n, */ page = compound_head(kmap_to_page((void *)ptr)); - if (PageSlab(compound_head(page))) { + if (PageSlab(page)) { /* Check slab allocator for flags and size. */ __check_heap_object(ptr, n, page, to_user); } else {
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org> --- mm/usercopy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)