From patchwork Wed Apr 12 10:24:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kara X-Patchwork-Id: 9677031 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 B22C960325 for ; Wed, 12 Apr 2017 10:26:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A3C5E285E3 for ; Wed, 12 Apr 2017 10:26:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 98D35285EC; Wed, 12 Apr 2017 10:26:05 +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=ham 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 46A7C285E3 for ; Wed, 12 Apr 2017 10:26:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753014AbdDLK0E (ORCPT ); Wed, 12 Apr 2017 06:26:04 -0400 Received: from mx2.suse.de ([195.135.220.15]:40264 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752508AbdDLKZJ (ORCPT ); Wed, 12 Apr 2017 06:25:09 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id E7493AEC1; Wed, 12 Apr 2017 10:25:03 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id C94671E3282; Wed, 12 Apr 2017 12:25:02 +0200 (CEST) From: Jan Kara To: Jens Axboe Cc: , , Jan Kara , Steven Whitehouse , Bob Peterson , cluster-devel@redhat.com Subject: [PATCH 18/25] gfs2: Convert to properly refcounting bdi Date: Wed, 12 Apr 2017 12:24:42 +0200 Message-Id: <20170412102449.16901-19-jack@suse.cz> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170412102449.16901-1-jack@suse.cz> References: <20170412102449.16901-1-jack@suse.cz> Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@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 Reviewed-by: Christoph Hellwig Signed-off-by: Jan Kara --- 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; }