From patchwork Tue Jan 10 15:03:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vernon Yang X-Patchwork-Id: 13095259 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id C8A12C54EBC for ; Tue, 10 Jan 2023 15:03:31 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5CEC78E0002; Tue, 10 Jan 2023 10:03:31 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 57E5B8E0001; Tue, 10 Jan 2023 10:03:31 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 41F158E0002; Tue, 10 Jan 2023 10:03:31 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 2E49C8E0001 for ; Tue, 10 Jan 2023 10:03:31 -0500 (EST) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id F121EA0D41 for ; Tue, 10 Jan 2023 15:03:30 +0000 (UTC) X-FDA: 80339208180.06.724F421 Received: from mail-pj1-f42.google.com (mail-pj1-f42.google.com [209.85.216.42]) by imf26.hostedemail.com (Postfix) with ESMTP id D4B42140014 for ; Tue, 10 Jan 2023 15:03:28 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=paSOTQBf; spf=pass (imf26.hostedemail.com: domain of vernon2gm@gmail.com designates 209.85.216.42 as permitted sender) smtp.mailfrom=vernon2gm@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1673363008; a=rsa-sha256; cv=none; b=1lIrFRr+xaZqtlm5HYKEp/R3onLGPYBAzRulHVa0vsmTeqnHRBFbYMwGZKza7xHXr1FlD0 YlbHkmUU60VAs6j7MlhluNNqVXjaD/o4Uc9NK9D4gF+aV3sSxva/+m+nWuLGz2+23TVLOz WWbWB8qUHcAY5598MiMUZZ4JiaY1Rms= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=paSOTQBf; spf=pass (imf26.hostedemail.com: domain of vernon2gm@gmail.com designates 209.85.216.42 as permitted sender) smtp.mailfrom=vernon2gm@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1673363008; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=6qhudAhZPV2iDT+KE0kLjqDPYcS33lIjDaCweDJV/Yw=; b=VdfHa0uXtLVOz83L4n/gJRg3AYuA0ePBh5BoNkff+zSyujJF1FX+7rEIhM7motCbxppBNH 1sZd0CM/7tb+ewc3NcAsDRP2x0tt5lA7WUF7Fw/AJ7VwnI8baTJJX7wquFMY1lSHI26n1r PLen/gl2MCxDmig24qonlF98FDX4T8w= Received: by mail-pj1-f42.google.com with SMTP id n12so12669380pjp.1 for ; Tue, 10 Jan 2023 07:03:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=6qhudAhZPV2iDT+KE0kLjqDPYcS33lIjDaCweDJV/Yw=; b=paSOTQBfcv/CXVsX2hlndz2PQG6+9r6Y7xHwUqxNwSJmyhdEV3NhWFNJINv5wopuCk bq6D18LQyZpX8zqs7Qux/I8r1v6mv4C9qKtdr4svj7ZqTrtLfycgr4Wc/LrfXp/T8EUV uxH2g7kZjvoAFIf/pm3/ZX8VpuiU1J/kgtMepjGfqzVwjchgMVobHlvHb/jK7FeoqiDo 9340HGdZJSlDuQMNdiUChR7W70w864zqVmUsDFq26m3cZA6JUNVAd5abOHeK0TQzAqt/ JQSpxoLpKyh1yc6Si5Wc9LR7C2tC0jZVEybizOTVM69oAewey4y06nNVZR5WCgkJWul7 wjJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=6qhudAhZPV2iDT+KE0kLjqDPYcS33lIjDaCweDJV/Yw=; b=wN7bzBlb6/ZxB1KqtrJkskeBHkIK/AM4N+a3TbOMuBDFN0380wnE96wXWI6OegrdF6 mIKQC34Djmf/p0WcPzX8Po1umbVFGZ+CERv4cXGeo69qNEUC7ZO0BkBuYH0FKUA/wiEm TtT0kMq/ickfBzIIMyhWnBX1cdUttUTtUkxJm3TBW5SOXQ8oV0GQvvFDjLVsasugd8wV yQxubLzZ9vNfT+9h0LTdoBgcckGyP7XxUpbwhxxMS9tTkmBzZg/aRqufZs7FpkJTWg9A Y976hN7WyAmo56KSGp2ne07VoMd5eN/a21vb1z1svq97xsRXCvM0tmAgn5DM7nPbyyfO 8oFA== X-Gm-Message-State: AFqh2kqU4vnna0dy//zwMQUWpCPP6cttko+xBvcmXIiF2sUaHyZyznd8 0XLfytovAxXSKGSxSecrcNg= X-Google-Smtp-Source: AMrXdXtEVrLHAPYBitDJrA9w0WXlvAmSp/3YBee3hkA9hVra97xsgiBYnqG+5bC0eFYM03Qoe6rXdw== X-Received: by 2002:a05:6a21:3942:b0:9d:efbe:2065 with SMTP id ac2-20020a056a21394200b0009defbe2065mr90520239pzc.27.1673363007601; Tue, 10 Jan 2023 07:03:27 -0800 (PST) Received: from vernon-pc.. ([49.67.3.29]) by smtp.gmail.com with ESMTPSA id y14-20020a63fa0e000000b004a7e39ff1e8sm7003212pgh.49.2023.01.10.07.03.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Jan 2023 07:03:26 -0800 (PST) From: Vernon Yang To: Liam.Howlett@Oracle.com, akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Vernon Yang Subject: [PATCH] mm/mmap: fix comment of unmapped_area{_topdown} Date: Tue, 10 Jan 2023 23:03:20 +0800 Message-Id: <20230110150320.1676299-1-vernon2gm@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Queue-Id: D4B42140014 X-Rspamd-Server: rspam01 X-Stat-Signature: 33awot9kk8y6h4aao38bpm448si3w7gh X-HE-Tag: 1673363008-399180 X-HE-Meta: U2FsdGVkX196RlXkG1m9tUUREalBNo1T0ILAEMgpy45PBX6ExoQlXpJ/EeE5pY1OEPwLLXsPbnvvn+h1xpvbRHBMe5HItReUF6ZVIN6dnHvabCBmVoyhPRh7vemLJI11wQdM34m5ZosigmPI4bPJuuOgIUxjQf5NAmAicP/JYv+EzMB0YYNFsGAmNw/VIt8KnBATb7sDJHORT0HzbKz8sG1zPneIe3bgEFNan+FCDl2zo8xdLc9ucv78CQ5tFUoO3ydp9jXzQ5PpIfiMK1HaYcxA6zVrFdDv/iSIrG3SiElqAMYXmtzSdJsL6n6QRmjSB6v+Q+RUU5FXHhu/pbKPfFQKhD4XWNb0E9PZ1ZyoNWTYmtx64KvBc9WwarazRO7ojIW0l2WSuYUYoG2618HDM7hAjhl7begHoMjnr6PXZueo+DYKmC4+0YPEvJE1Gnmd7hCNTYFeUv0NZN/xtNmueTQN6IoJGqNCAxMa8aSy4YIGQ+3Cz1IV8eus7ie3426jW6Z5sIP9TVyRFcSjqUxvlifLP20kd57QJUy3LJRcMWUaDXrwnUvDIZ/cyoc7gej+MDslsn+pGKViF/Db2h6mWdfEjaS42Ovhl3bIzkl46VYD5eBtTq6gIok6FfiVwFpvJBF3Cdh5xgPWbWJxn4HVjxyLaqGdwhlfoSt5/vVCtCIAh44P/L/7XgWDydnNcnBn5Z/pecNWZI5nGzBR1asZL6+NRVBXOOhLp3r73ltHN8vzvua15MrJVF39ZRYjDzaSW+tNYB6dOcEzzXC8/qc3AyR4iAiyCleMKwDr8pPmbOpBt1P8PU4TOUcT920dFcOLNi6SYMN1DGH4vR/+Otc34+ety4oDfDruI4kVZQoz3bGBLI60GQLsXv4G8w7dvrcHYI+iCtLm3SxAHuBxDNMAgvPlg3nVP2dmHz2OSez/k8OT9EimQMnFFEyrbX2IWQWRbGdN5bKuuxftS9hUUFv Ok5obf37 ncVRgZZf4dc2uLCxYxCVLaF+uAClcSfsD3d7Qk2ovQnL90CXmHbADsNzGxtTri1XZUNiM2rrhKR4uLFcBfiNld2kaoXtjD8I0C+o0bF7LB0hbyswL+DC48gKtsMVoA/SjGxuUdSCnHLFn98T12/yAG0oe/hB712xdjC6y82IATeNP6nM= 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: The low_limit of unmapped area information is inclusive, and the hight_limit is not, so make the comment to correct. Fixes: 3499a13168da ("mm/mmap: use maple tree for unmapped_area{_topdown}") Signed-off-by: Vernon Yang --- mm/mmap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mm/mmap.c b/mm/mmap.c index c9da9119d7f2..e06f9ae34ff8 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -1554,7 +1554,7 @@ static inline int accountable_mapping(struct file *file, vm_flags_t vm_flags) * the correct alignment and offset, all from @info. Note: current->mm is used * for the search. * - * @info: The unmapped area information including the range (low_limit - + * @info: The unmapped area information including the range [low_limit - * hight_limit), the alignment offset and mask. * * Return: A memory address or -ENOMEM. @@ -1581,10 +1581,10 @@ static unsigned long unmapped_area(struct vm_unmapped_area_info *info) /** * unmapped_area_topdown() - Find an area between the low_limit and the - * high_limit with * the correct alignment and offset at the highest available + * high_limit with the correct alignment and offset at the highest available * address, all from @info. Note: current->mm is used for the search. * - * @info: The unmapped area information including the range (low_limit - + * @info: The unmapped area information including the range [low_limit - * hight_limit), the alignment offset and mask. * * Return: A memory address or -ENOMEM.