From patchwork Thu Feb 2 17:34:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kara X-Patchwork-Id: 9552713 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 25CD860405 for ; Thu, 2 Feb 2017 17:36:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1C1F61FFD7 for ; Thu, 2 Feb 2017 17:36:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 10E092849B; Thu, 2 Feb 2017 17:36:19 +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 B90F21FFD7 for ; Thu, 2 Feb 2017 17:36:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752372AbdBBRgL (ORCPT ); Thu, 2 Feb 2017 12:36:11 -0500 Received: from mx2.suse.de ([195.135.220.15]:45490 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752334AbdBBRgF (ORCPT ); Thu, 2 Feb 2017 12:36:05 -0500 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 7858AAD63; Thu, 2 Feb 2017 17:35:58 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id 7427E1E34CB; Thu, 2 Feb 2017 18:35:54 +0100 (CET) From: Jan Kara To: Cc: Christoph Hellwig , linux-block@vger.kernel.org, Jan Kara , Ryusuke Konishi , linux-nilfs@vger.kernel.org Subject: [PATCH 19/24] nilfs2: Convert to properly refcounting bdi Date: Thu, 2 Feb 2017 18:34:17 +0100 Message-Id: <20170202173422.3240-20-jack@suse.cz> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20170202173422.3240-1-jack@suse.cz> References: <20170202173422.3240-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() NILFS2 just used block device reference to bdi. Convert it to properly getting bdi reference. The reference will get automatically dropped on superblock destruction. CC: Ryusuke Konishi CC: linux-nilfs@vger.kernel.org Signed-off-by: Jan Kara --- fs/nilfs2/super.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/nilfs2/super.c b/fs/nilfs2/super.c index e1872f36147f..feb796a38b8d 100644 --- a/fs/nilfs2/super.c +++ b/fs/nilfs2/super.c @@ -1068,7 +1068,8 @@ nilfs_fill_super(struct super_block *sb, void *data, int silent) sb->s_time_gran = 1; sb->s_max_links = NILFS_LINK_MAX; - sb->s_bdi = bdev_get_queue(sb->s_bdev)->backing_dev_info; + sb->s_bdi = bdi_get(sb->s_bdev->bd_bdi); + sb->s_iflags |= SB_I_DYNBDI; err = load_nilfs(nilfs, sb); if (err)