Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2673749pxb; Tue, 12 Oct 2021 11:05:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyR5N+DNAZboiIXNoINfnFUAlix+2hGBcV/SZw0Phph49BTwEsSh9g62B5ZRmgaYhXKIqCN X-Received: by 2002:a17:903:2341:b0:13e:ae30:412 with SMTP id c1-20020a170903234100b0013eae300412mr31386026plh.15.1634061948590; Tue, 12 Oct 2021 11:05:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634061948; cv=none; d=google.com; s=arc-20160816; b=VR4AwiIt9eZ0F4IJmpD8csUGhCK65/4JTyAeu8nHdavNy1MAED78HisIHAwmAOjR8o MhXlgss51AGBL0zCJBEHd37NCK08nPdt/FSTRknFE2PYkNYZ1Lv7F49cg8A1XNhfnrwM fioCsBf/RcxAtB+HS1jyNV1caxIDG0aIOEK8sRxa1BSLL2o6XZwSXBXw7XlKoa6LaVmD cNWir5A6puzozn6Z0/d3PPICVb1RG55RsuRhtpDOhW/PyVZmfA6Qw80L9ugFbqkftoG5 q6L4u71nWrXGeVsoZ74RCXnoR/g7IxihipqD5iBSeEPEZhh5mbOHK4HQJ59lO/x1pe4g re3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=5lvw5Qkq1aYtQrdDyynEw7+1fb+LBtUMWle5QZBxmmc=; b=STwq3MZXL0vLuzBOWb1G7UOGsS9UWHJFXVzL6pOGKhDFSio2OwQVzZQ/nyJ+WMRY0o i11NQXfHI8X+xxVUlua8DVfv+iZHxP/CITZSh1OoeaDJ4/feS8ESwZtUlFGUhzV3KpTs Xf28CjI+pnuyIscARhCIq3ubiK1oVMaWZBcMmbBme9Sf9awzR4My8C+j+evjj7LzCK9T /MxpvU+CtL6igHzH7MH+sC7fnHD4e/VzGNhNO9O2vYG16ku8erw6tTAi/Co8t0ykWFOP Y3KE8Lpt8wsP/7kQ7idlR4p/4BuSQMB5T2GqDC7Y5tISuHTp8+HYHAFayk+Cpx0aCKBV ftsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cmpxchg-org.20210112.gappssmtp.com header.s=20210112 header.b=ZRxAa3dC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q15si18688227plx.191.2021.10.12.11.05.28; Tue, 12 Oct 2021 11:05:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@cmpxchg-org.20210112.gappssmtp.com header.s=20210112 header.b=ZRxAa3dC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233486AbhJLSE1 (ORCPT + 99 others); Tue, 12 Oct 2021 14:04:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232532AbhJLSEF (ORCPT ); Tue, 12 Oct 2021 14:04:05 -0400 Received: from mail-qt1-x832.google.com (mail-qt1-x832.google.com [IPv6:2607:f8b0:4864:20::832]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 13977C061765 for ; Tue, 12 Oct 2021 11:02:02 -0700 (PDT) Received: by mail-qt1-x832.google.com with SMTP id c20so176198qtb.2 for ; Tue, 12 Oct 2021 11:02:02 -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=C7/07Bx2znUjf4zJlmO0SzI+pzfJuoxRtmhe8xfyRbXMoQKSJoJUg/vdiels37ykV4 ZIhvD7lRRu9QxCr8SpU+dpNkzRy4feJ6sM9XHGgk6+hZA4GoBCL261y6OPqaxMhd6c9F CTV0tkGswLU0JkLY9FjM/mvk/oOdBiEd7ITbbXhxxQi2amDnNMmAOc1N4ChfuPDltDhW Nu4+JPHunHBQQo+xJbv+Fcb3joxhPgs/lZew6gWQyhXfrTEr6l2kx/uFUMJLyuDYsCp9 4G9nFEzvC8MTgUZuAsJF89C53ftBZ2pC6qshpok+KA51JKKK6++vVVZy9dJugijU/X8K 4azQ== X-Gm-Message-State: AOAM530jjNpTkKtfr26PTqMKZrqzzhBwMIKNArd0C/N0AAy+WtJHQBqK u7LBUrb1w/O1YDhZuzj3Bb3PSg== 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 To: linux-mm@kvack.org Cc: Matthew Wilcox , Kent Overstreet , "Kirill A. Shutemov" , Vlastimil Babka , Michal Hocko , Roman Gushchin , 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 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Signed-off-by: Johannes Weiner --- mm/usercopy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 { -- 2.32.0