Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp3996990rdb; Mon, 11 Dec 2023 06:13:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IGu75wtWFG3GZ7DaM35vDitWbyA30U65o91DeeBtZFxzV6uNFAQ1TmunjgKlKzANxcB9xEX X-Received: by 2002:a05:6e02:1948:b0:35d:5421:3588 with SMTP id x8-20020a056e02194800b0035d54213588mr7848281ilu.17.1702304039685; Mon, 11 Dec 2023 06:13:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702304039; cv=none; d=google.com; s=arc-20160816; b=LhkvDsdYk42ZKzH5Mi/3so2WOZOaY2ZQIYRQ49Nugar92XxNoXLWc6BJSzKqi1YK3x F2Mrr09ZQVLbjGizKJFJp2wSC7ammQ8OQ2qKdw697lSPOixiUbpnAh6zW/PlXjZYeXne 2tZV7AbeJYMPog0avvka7Or59GrGOgHHNirJoglEa8XWyhPau0G8e5Xx2vwrQa4Mt5I2 KeG6XyBO44WqGP/vV7hK051Zs2659nJOpFV667aNp44sRMW5B9WV+XUkPfq8oay171Ad kwpTrGipcf9zc/vJGeRb+HZf2wZnSpFC5WtZb7LXtIvbjqCF/zheCCtnuGsWbLbUO/xZ b/Bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=t+SoySiW1C40bC54rtYkpxfM3XsnS15z/LdIRjIQnjA=; fh=ewjcwSOkiqoDqBkoSn9uLOsJItfx5w5YcyErEa5iLiM=; b=qHn8Tka9DD7CJHMHw82RWDL48R2U56Si9Dc2RL0AN3/AUPuoCrTXqHXdpf90Y30RLG nAHkEH4+hHnSg3sawP/CiFo5IZ/LXQ8ukogPle9zY9WvpcvyCrSAgg/NiNalyV1pjHnb HvXXc3VO1FJQffb1MfbMPPi7widtbzZlQcMkFEhZfqMYF7wiBXVLVCI2PRgMtjRePX/a 9MdFUn54FYes36HLp/Rm+MU/RIAmR0hMxsA04JzLoiX+1Xg6O2dDmue54HE9EoQPEgKR v8AymGFoFwG/iNeyMVD//2YXhoGZOAwhEAERL5IAWYHm+tk0+G5nEBR2pTBvYgMZ+sSR yoyw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4+bounces-371-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-ext4+bounces-371-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id s2-20020a63f042000000b005c6859735fbsi5873153pgj.770.2023.12.11.06.13.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 06:13:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4+bounces-371-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-ext4+bounces-371-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-ext4+bounces-371-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 414D1281F2B for ; Mon, 11 Dec 2023 14:13:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AF5424EB4F; Mon, 11 Dec 2023 14:08:59 +0000 (UTC) X-Original-To: linux-ext4@vger.kernel.org Received: from dggsgout11.his.huawei.com (unknown [45.249.212.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 99BA1A27A; Mon, 11 Dec 2023 06:08:56 -0800 (PST) Received: from mail.maildlp.com (unknown [172.19.163.216]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4SpkB85zFZz4f3lWC; Mon, 11 Dec 2023 22:08:48 +0800 (CST) Received: from mail02.huawei.com (unknown [10.116.40.112]) by mail.maildlp.com (Postfix) with ESMTP id ACA251A0AEF; Mon, 11 Dec 2023 22:08:53 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.104.67]) by APP1 (Coremail) with SMTP id cCh0CgDX2xHyF3dl1JtxDQ--.35010S4; Mon, 11 Dec 2023 22:08:52 +0800 (CST) From: Yu Kuai To: axboe@kernel.dk, roger.pau@citrix.com, colyli@suse.de, kent.overstreet@gmail.com, joern@lazybastard.org, miquel.raynal@bootlin.com, richard@nod.at, vigneshr@ti.com, sth@linux.ibm.com, hoeppner@linux.ibm.com, hca@linux.ibm.com, gor@linux.ibm.com, agordeev@linux.ibm.com, jejb@linux.ibm.com, martin.petersen@oracle.com, clm@fb.com, josef@toxicpanda.com, dsterba@suse.com, viro@zeniv.linux.org.uk, brauner@kernel.org, nico@fluxnic.net, xiang@kernel.org, chao@kernel.org, tytso@mit.edu, adilger.kernel@dilger.ca, agruenba@redhat.com, jack@suse.com, konishi.ryusuke@gmail.com, willy@infradead.org, akpm@linux-foundation.org, p.raghav@samsung.com, hare@suse.de Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org, linux-bcache@vger.kernel.org, linux-mtd@lists.infradead.org, linux-s390@vger.kernel.org, linux-scsi@vger.kernel.org, linux-bcachefs@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-erofs@lists.ozlabs.org, linux-ext4@vger.kernel.org, gfs2@lists.linux.dev, linux-nilfs@vger.kernel.org, yukuai3@huawei.com, yukuai1@huaweicloud.com, yi.zhang@huawei.com, yangerkun@huawei.com Subject: [PATCH RFC v2 for-6.8/block 12/18] gfs2: use bdev api Date: Mon, 11 Dec 2023 22:07:28 +0800 Message-Id: <20231211140728.974887-1-yukuai1@huaweicloud.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231211140552.973290-1-yukuai1@huaweicloud.com> References: <20231211140552.973290-1-yukuai1@huaweicloud.com> Precedence: bulk X-Mailing-List: linux-ext4@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID:cCh0CgDX2xHyF3dl1JtxDQ--.35010S4 X-Coremail-Antispam: 1UD129KBjvJXoW7ZFyUZFWfCw1DKw45ZF1fZwb_yoW8Jw45pr yDAF1akF4kWrnIgaykZF4rt3WUWay8G3yxAr95Aw1YvrZrW3Wag392kF4UJF45Ja97JwsI ga1ayw4akr1agrUanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUv014x267AKxVWrJVCq3wAFc2x0x2IEx4CE42xK8VAvwI8IcIk0 rVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2ocxC64kIII0Yj41l84x0c7CEw4AK67xGY2AK02 1l84ACjcxK6xIIjxv20xvE14v26F1j6w1UM28EF7xvwVC0I7IYx2IY6xkF7I0E14v26F4U JVW0owA2z4x0Y4vEx4A2jsIE14v26rxl6s0DM28EF7xvwVC2z280aVCY1x0267AKxVW0oV Cq3wAS0I0E0xvYzxvE52x082IY62kv0487Mc02F40EFcxC0VAKzVAqx4xG6I80ewAv7VC0 I7IYx2IY67AKxVWUXVWUAwAv7VC2z280aVAFwI0_Jr0_Gr1lOx8S6xCaFVCjc4AY6r1j6r 4UM4x0Y48IcxkI7VAKI48JM4x0x7Aq67IIx4CEVc8vx2IErcIFxwACI402YVCY1x02628v n2kIc2xKxwCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F4 0E14v26r1j6r18MI8I3I0E7480Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_Wrv_Gr1U MIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_Gr0_Xr1lIxAIcVC0I7IYx2IY6xkF7I 0E14v26F4UJVW0owCI42IY6xAIw20EY4v20xvaj40_Jr0_JF4lIxAIcVC2z280aVAFwI0_ Gr0_Cr1lIxAIcVC2z280aVCY1x0267AKxVWxJr0_GcJvcSsGvfC2KfnxnUUI43ZEXa7VUb Mq2tUUUUU== X-CM-SenderInfo: 51xn3trlr6x35dzhxuhorxvhhfrp/ From: Yu Kuai Avoid to access bd_inode directly, prepare to remove bd_inode from block_devcie. Signed-off-by: Yu Kuai --- fs/gfs2/glock.c | 2 +- fs/gfs2/ops_fstype.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index d6bf1f8c25dc..4128a5bc4bb6 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c @@ -1210,7 +1210,7 @@ int gfs2_glock_get(struct gfs2_sbd *sdp, u64 number, mapping = gfs2_glock2aspace(gl); if (mapping) { mapping->a_ops = &gfs2_meta_aops; - mapping->host = s->s_bdev->bd_inode; + bdev_associated_mapping(s->s_bdev, mapping); mapping->flags = 0; mapping_set_gfp_mask(mapping, GFP_NOFS); mapping->private_data = NULL; diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c index b108c5d26839..56ae8959b55a 100644 --- a/fs/gfs2/ops_fstype.c +++ b/fs/gfs2/ops_fstype.c @@ -114,7 +114,7 @@ static struct gfs2_sbd *init_sbd(struct super_block *sb) address_space_init_once(mapping); mapping->a_ops = &gfs2_rgrp_aops; - mapping->host = sb->s_bdev->bd_inode; + bdev_associated_mapping(sb->s_bdev, mapping); mapping->flags = 0; mapping_set_gfp_mask(mapping, GFP_NOFS); mapping->private_data = NULL; -- 2.39.2