From patchwork Thu Sep 16 21:55:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: zhangyiru X-Patchwork-Id: 12499155 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.8 required=3.0 tests=BAYES_00, DATE_IN_FUTURE_06_12,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D118BC433EF for ; Thu, 16 Sep 2021 13:55:20 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 433C761241 for ; Thu, 16 Sep 2021 13:55:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 433C761241 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id D3A95900002; Thu, 16 Sep 2021 09:55:19 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id CE91A6B0073; Thu, 16 Sep 2021 09:55:19 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C30ED6B0071; Thu, 16 Sep 2021 09:55:19 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0042.hostedemail.com [216.40.44.42]) by kanga.kvack.org (Postfix) with ESMTP id B50086B0071 for ; Thu, 16 Sep 2021 09:55:19 -0400 (EDT) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 654831823DABB for ; Thu, 16 Sep 2021 13:55:19 +0000 (UTC) X-FDA: 78593583558.29.B569E04 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by imf15.hostedemail.com (Postfix) with ESMTP id 77654D00009D for ; Thu, 16 Sep 2021 13:55:17 +0000 (UTC) Received: from dggemv703-chm.china.huawei.com (unknown [172.30.72.53]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4H9JTv5zGrzW899; Thu, 16 Sep 2021 21:54:11 +0800 (CST) Received: from dggpemm500012.china.huawei.com (7.185.36.89) by dggemv703-chm.china.huawei.com (10.3.19.46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.8; Thu, 16 Sep 2021 21:55:14 +0800 Received: from huawei.com (10.175.104.170) by dggpemm500012.china.huawei.com (7.185.36.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.8; Thu, 16 Sep 2021 21:55:13 +0800 From: zhangyiru To: , CC: , , , , Subject: [PATCH v2] mm,hugetlb: remove mlock ulimit for SHM_HUGETLB Date: Thu, 16 Sep 2021 17:55:11 -0400 Message-ID: <20210916215511.114300-1-zhangyiru3@huawei.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-Originating-IP: [10.175.104.170] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpemm500012.china.huawei.com (7.185.36.89) X-CFilter-Loop: Reflected Authentication-Results: imf15.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=huawei.com; spf=pass (imf15.hostedemail.com: domain of zhangyiru3@huawei.com designates 45.249.212.187 as permitted sender) smtp.mailfrom=zhangyiru3@huawei.com X-Stat-Signature: cdnb7maf7htzhah4o7nnurf3aw7akmb8 X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 77654D00009D X-HE-Tag: 1631800517-32611 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: commit 21a3c273f88c9cbbaf7e ("mm, hugetlb: add thread name and pid to SHM_HUGETLB mlock rlimit warning") marked this as deprecated in 2012, but it is not deleted yet. Mike says he still see that message in log files on occasion, so maybe we should preserve this warning. Signed-off-by: zhangyiru --- Changelog: v2: preserve warning message v1: remove mlock ulimit for SHM_HUGETLB --- fs/hugetlbfs/inode.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c index cdfb1ae78a3f..877d0ce9526c 100644 --- a/fs/hugetlbfs/inode.c +++ b/fs/hugetlbfs/inode.c @@ -1470,10 +1470,9 @@ struct file *hugetlb_file_setup(const char *name, size_t size, pr_warn_once("%s (%d): Using mlock ulimits for SHM_HUGETLB is deprecated\n", current->comm, current->pid); task_unlock(current); - } else { - *ucounts = NULL; - return ERR_PTR(-EPERM); } + *ucounts = NULL; + return ERR_PTR(-EPERM); } file = ERR_PTR(-ENOSPC);