From patchwork Wed Mar 29 10:56:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kara X-Patchwork-Id: 9651299 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id EEAC06034B for ; Wed, 29 Mar 2017 10:58:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ED41D2844E for ; Wed, 29 Mar 2017 10:58:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E25BA2846B; Wed, 29 Mar 2017 10:58:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A83472844E for ; Wed, 29 Mar 2017 10:58:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932595AbdC2K54 (ORCPT ); Wed, 29 Mar 2017 06:57:56 -0400 Received: from mx2.suse.de ([195.135.220.15]:33864 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756080AbdC2K4c (ORCPT ); Wed, 29 Mar 2017 06:56:32 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 3ACBCAD48; Wed, 29 Mar 2017 10:56:29 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id 53EC51E1291; Wed, 29 Mar 2017 12:56:26 +0200 (CEST) From: Jan Kara To: Cc: linux-block@vger.kernel.org, Christoph Hellwig , Jan Kara , Steven Whitehouse , Bob Peterson , cluster-devel@redhat.com Subject: [PATCH 18/25] gfs2: Convert to properly refcounting bdi Date: Wed, 29 Mar 2017 12:56:16 +0200 Message-Id: <20170329105623.18241-19-jack@suse.cz> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20170329105623.18241-1-jack@suse.cz> References: <20170329105623.18241-1-jack@suse.cz> Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Similarly to set_bdev_super() GFS2 just used block device reference to bdi. Convert it to properly getting bdi reference. The reference will get automatically dropped on superblock destruction. CC: Steven Whitehouse CC: Bob Peterson CC: cluster-devel@redhat.com Signed-off-by: Jan Kara Reviewed-by: Christoph Hellwig --- fs/gfs2/ops_fstype.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c index b108e7ba81af..e6b6f97d0fc1 100644 --- a/fs/gfs2/ops_fstype.c +++ b/fs/gfs2/ops_fstype.c @@ -23,6 +23,7 @@ #include #include #include +#include #include "gfs2.h" #include "incore.h" @@ -1222,12 +1223,8 @@ static int set_gfs2_super(struct super_block *s, void *data) { s->s_bdev = data; s->s_dev = s->s_bdev->bd_dev; - - /* - * We set the bdi here to the queue backing, file systems can - * overwrite this in ->fill_super() - */ - s->s_bdi = bdev_get_queue(s->s_bdev)->backing_dev_info; + s->s_bdi = bdi_get(s->s_bdev->bd_bdi); + s->s_iflags |= SB_I_DYNBDI; return 0; }