From patchwork Mon Jun 6 03:45:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Wandun X-Patchwork-Id: 12869906 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 7921CC433EF for ; Mon, 6 Jun 2022 03:25:01 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id ED99A8D0002; Sun, 5 Jun 2022 23:25:00 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E8B888D0001; Sun, 5 Jun 2022 23:25:00 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D510D8D0002; Sun, 5 Jun 2022 23:25:00 -0400 (EDT) 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 C48F08D0001 for ; Sun, 5 Jun 2022 23:25:00 -0400 (EDT) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 9618334E2C for ; Mon, 6 Jun 2022 03:25:00 +0000 (UTC) X-FDA: 79546369560.13.4304B75 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by imf17.hostedemail.com (Postfix) with ESMTP id A54B640004 for ; Mon, 6 Jun 2022 03:24:18 +0000 (UTC) Received: from dggpemm500024.china.huawei.com (unknown [172.30.72.55]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4LGf415QJCzKmJy; Mon, 6 Jun 2022 11:24:33 +0800 (CST) Received: from dggpemm500002.china.huawei.com (7.185.36.229) by dggpemm500024.china.huawei.com (7.185.36.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Mon, 6 Jun 2022 11:24:49 +0800 Received: from localhost.localdomain (10.175.112.125) by dggpemm500002.china.huawei.com (7.185.36.229) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Mon, 6 Jun 2022 11:24:49 +0800 From: Chen Wandun To: , , , , , , CC: Subject: [PATCH v3 0/3] a few cleanup and bugfixes about shmem Date: Mon, 6 Jun 2022 11:45:27 +0800 Message-ID: <20220606034530.153505-1-chenwandun@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Originating-IP: [10.175.112.125] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggpemm500002.china.huawei.com (7.185.36.229) X-CFilter-Loop: Reflected Authentication-Results: imf17.hostedemail.com; dkim=none; spf=pass (imf17.hostedemail.com: domain of chenwandun@huawei.com designates 45.249.212.189 as permitted sender) smtp.mailfrom=chenwandun@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: A54B640004 X-Rspam-User: X-Stat-Signature: toszty739yc5d3q4qa717jzfq8ygosiy X-HE-Tag: 1654485858-739536 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: v2 ==> v3: patch1 return the errno from shmem_init_inodecache instead of NULL on failure. v1 ==> v2: combine patch2 and patch3 into a single patch. Chen Wandun (3): mm/shmem: check return value of shmem_init_inodecache mm/shmem: return error code directly for invalid addr mm/shmem: rework calculation of inflated_addr in shmem_get_unmapped_area mm/shmem.c | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-)