From mboxrd@z Thu Jan 1 00:00:00 1970 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=-13.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,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 14610C433E2 for ; Sat, 12 Sep 2020 10:14:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C8E1E2158C for ; Sat, 12 Sep 2020 10:14:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599905671; bh=tGUHCOsqQ70R/bp+rBmmDX7aQMNfyisGukAglsV5esE=; h=From:To:Cc:Subject:Date:List-ID:From; b=jqeDXZ+TmrIc86Xle5XNIC+/oPV43K7W4EqwhjRXI70KmvEHWdWrOx6qs/EIRqylJ S8/Mjc+aOFEUi2PVQTC8IRFJmIKCpvpRd6nm+iSiVPC8WwzCOjZ1kjR2cYr51OLlOd LqSatMrThG1mNvl+QnG0ALQ+aflaqIYepOjQ9fKM= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725854AbgILKO3 (ORCPT ); Sat, 12 Sep 2020 06:14:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:48758 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725847AbgILKO1 (ORCPT ); Sat, 12 Sep 2020 06:14:27 -0400 Received: from tleilax.poochiereds.net (68-20-15-154.lightspeed.rlghnc.sbcglobal.net [68.20.15.154]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7ACF1214D8; Sat, 12 Sep 2020 10:14:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599905666; bh=tGUHCOsqQ70R/bp+rBmmDX7aQMNfyisGukAglsV5esE=; h=From:To:Cc:Subject:Date:From; b=0iSdCuqiU80Cl2bpECS2JtmBrIfRpmg7MAw+Lw+CC2FxjqM5dl+5NVjhAdwpIE27y ytCQtreGaDgcdBTQ6EKhBMkQewjdHLx8O7EoMlH51EfpZYRm4nUVXZetIqQTQ0yO9l 033GJeScwL93G2E4shsyZsp6597fKmRlt65rjT9E= From: Jeff Layton To: ceph-devel@vger.kernel.org Cc: idryomov@gmail.com Subject: [PATCH] ceph: use kill_anon_super helper Date: Sat, 12 Sep 2020 06:14:24 -0400 Message-Id: <20200912101424.5659-1-jlayton@kernel.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org ceph open-codes this around some other activity and the rationale for it isn't clear. There is no need to delay free_anon_bdev until the end of kill_sb. Signed-off-by: Jeff Layton --- fs/ceph/super.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fs/ceph/super.c b/fs/ceph/super.c index 7ec0e6d03d10..b3fc9bb61afc 100644 --- a/fs/ceph/super.c +++ b/fs/ceph/super.c @@ -1205,14 +1205,13 @@ static int ceph_init_fs_context(struct fs_context *fc) static void ceph_kill_sb(struct super_block *s) { struct ceph_fs_client *fsc = ceph_sb_to_client(s); - dev_t dev = s->s_dev; dout("kill_sb %p\n", s); ceph_mdsc_pre_umount(fsc->mdsc); flush_fs_workqueues(fsc); - generic_shutdown_super(s); + kill_anon_super(s); fsc->client->extra_mon_dispatch = NULL; ceph_fs_debugfs_cleanup(fsc); @@ -1220,7 +1219,6 @@ static void ceph_kill_sb(struct super_block *s) ceph_fscache_unregister_fs(fsc); destroy_fs_client(fsc); - free_anon_bdev(dev); } static struct file_system_type ceph_fs_type = { -- 2.26.2