From patchwork Tue Sep 14 07:28:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Muchun Song X-Patchwork-Id: 12492035 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=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 DD61AC433F5 for ; Tue, 14 Sep 2021 07:37:05 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8FD6460F21 for ; Tue, 14 Sep 2021 07:37:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 8FD6460F21 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=bytedance.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 37A5F94000F; Tue, 14 Sep 2021 03:37:05 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3029A940007; Tue, 14 Sep 2021 03:37:05 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1A3A994000F; Tue, 14 Sep 2021 03:37:05 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0171.hostedemail.com [216.40.44.171]) by kanga.kvack.org (Postfix) with ESMTP id 0C4F2940007 for ; Tue, 14 Sep 2021 03:37:05 -0400 (EDT) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id C670C2BA99 for ; Tue, 14 Sep 2021 07:37:04 +0000 (UTC) X-FDA: 78585372768.14.673A281 Received: from mail-pf1-f172.google.com (mail-pf1-f172.google.com [209.85.210.172]) by imf08.hostedemail.com (Postfix) with ESMTP id 8EA0A30000A9 for ; Tue, 14 Sep 2021 07:37:04 +0000 (UTC) Received: by mail-pf1-f172.google.com with SMTP id 18so11318731pfh.9 for ; Tue, 14 Sep 2021 00:37:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=v0G9QgPg+hfzr8x+8Bx7OvscmO6lHALpSRI/OEyBuHk=; b=uATwrDbNiKHs9A7JcSMurQYgFjrqGaAO75qRq8TzmBt1Rpc2g67hGH2yRdHL4jZi4G hYnWKMCzOyhKim3DowkY0wtEoLF2nGbkmHrkrR5ZCNto7iZ31dVwTvv3/hGqSgD1On4O B0ZV5zdqMy/vIb9hXB4LxN/ZT7qcw3bhzAzXJa9xvIP26Fs0Z8oDVn2uERxib8SKqySV l1eNsBvpM1/48WN2d9Cvc6KA5W9rebm12c3l7Gp188hSoC4uzgVZJ5ENUmKoNfO2XC8w o29ubWCMaEQEPnOXZEBR+pzVqP9EuZu3b4YQRgUAbJYR7Twx1UOwT1Z04DCXTFSjcOzW KviQ== 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=v0G9QgPg+hfzr8x+8Bx7OvscmO6lHALpSRI/OEyBuHk=; b=XnbENPS7N5nlmvRrfb8q5xgYS1aY4cGsQdBVzdPsVRJP/S0eIX8b2eWwxORJbO0+U2 tgu/L8YyZT3bx/35SQn+FjQWQqFJ30p8Pc0sui/7CBDWKEPwyVsrXIhkU76nnSpSZ4CC 0EwVpMOSbIWA16fOEU/ZGZg/sp4iNNHoQ9Uu0sYW0hVuMHR2tn3RKqc9P4ufnkpKUXl2 aVh13WB+FVScHrd5aYPePkYX0gSybD789WQScW9a5Y7CmFP/BZCBmtOTT/z8+KKcFbNH q14K7oXEuJ4yXGi4JfSxKn0rGzsybevxd/Q4rp/ne7e8nJYzOjN78zTwpvVCCS6WA5xL 4d7g== X-Gm-Message-State: AOAM532RS3C1E+7nCFwcrxTwzCZuFhR0QNMz94U8P0mSSaeTaRv7ARFl R7GI1ZE5z+f9S0Bpeq+K2/8vug== X-Google-Smtp-Source: ABdhPJxFZacq7xaIgBaomiZ8xQ8HnyQqJjq+FaOSbVOzDFUzBUGypQEmmhDAS0VvitHHAR9ty4tO1Q== X-Received: by 2002:a05:6a00:2a2:b0:43d:ea13:9c06 with SMTP id q2-20020a056a0002a200b0043dea139c06mr3386511pfs.37.1631605023758; Tue, 14 Sep 2021 00:37:03 -0700 (PDT) Received: from localhost.localdomain ([139.177.225.244]) by smtp.gmail.com with ESMTPSA id s3sm9377839pfd.188.2021.09.14.00.36.56 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 Sep 2021 00:37:03 -0700 (PDT) From: Muchun Song To: willy@infradead.org, akpm@linux-foundation.org, hannes@cmpxchg.org, mhocko@kernel.org, vdavydov.dev@gmail.com, shakeelb@google.com, guro@fb.com, shy828301@gmail.com, alexs@kernel.org, richard.weiyang@gmail.com, david@fromorbit.com, trond.myklebust@hammerspace.com, anna.schumaker@netapp.com Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-nfs@vger.kernel.org, zhengqi.arch@bytedance.com, duanxiongchun@bytedance.com, fam.zheng@bytedance.com, smuchun@gmail.com, Muchun Song Subject: [PATCH v3 34/76] hostfs: allocate inode by using alloc_inode_sb() Date: Tue, 14 Sep 2021 15:28:56 +0800 Message-Id: <20210914072938.6440-35-songmuchun@bytedance.com> X-Mailer: git-send-email 2.21.0 (Apple Git-122) In-Reply-To: <20210914072938.6440-1-songmuchun@bytedance.com> References: <20210914072938.6440-1-songmuchun@bytedance.com> MIME-Version: 1.0 X-Stat-Signature: bsosknbzjgtoauo9ckwokghfi3s65o9b Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=bytedance-com.20150623.gappssmtp.com header.s=20150623 header.b=uATwrDbN; dmarc=pass (policy=none) header.from=bytedance.com; spf=pass (imf08.hostedemail.com: domain of songmuchun@bytedance.com designates 209.85.210.172 as permitted sender) smtp.mailfrom=songmuchun@bytedance.com X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 8EA0A30000A9 X-HE-Tag: 1631605024-852882 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 inode allocation is supposed to use alloc_inode_sb(), so convert kmem_cache_alloc() to alloc_inode_sb(). Signed-off-by: Muchun Song --- fs/hostfs/hostfs_kern.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c index d5c9d886cd9f..2123d2bed55b 100644 --- a/fs/hostfs/hostfs_kern.c +++ b/fs/hostfs/hostfs_kern.c @@ -222,7 +222,7 @@ static struct inode *hostfs_alloc_inode(struct super_block *sb) { struct hostfs_inode_info *hi; - hi = kmem_cache_alloc(hostfs_inode_cache, GFP_KERNEL_ACCOUNT); + hi = alloc_inode_sb(sb, hostfs_inode_cache, GFP_KERNEL_ACCOUNT); if (hi == NULL) return NULL; hi->fd = -1;