From mboxrd@z Thu Jan 1 00:00:00 1970 From: Boaz Harrosh Subject: Re: Regression caused by using node_to_bdi() Date: Mon, 13 Apr 2015 15:44:05 +0300 Message-ID: <552BBA15.4040500@plexistor.com> References: <016d01d07380$fc37fc40$f4a7f4c0$@cn.fujitsu.com> <552A57F8.7020002@plexistor.com> <20150413122110.GE3633@quack.suse.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: Zhao Lei , 'Christoph Hellwig' , linux-fsdevel@vger.kernel.org, 'Jens Axboe' , 'LKML' To: Jan Kara Return-path: Received: from mail-wi0-f177.google.com ([209.85.212.177]:37027 "EHLO mail-wi0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932726AbbDMMoJ (ORCPT ); Mon, 13 Apr 2015 08:44:09 -0400 Received: by widdi4 with SMTP id di4so50040850wid.0 for ; Mon, 13 Apr 2015 05:44:08 -0700 (PDT) In-Reply-To: <20150413122110.GE3633@quack.suse.cz> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On 04/13/2015 03:21 PM, Jan Kara wrote: <> >> -struct backing_dev_info *inode_to_bdi(struct inode *inode); >> +struct backing_dev_info *__inode_to_bdi(struct inode *inode); >> + >> +static inline >> +struct backing_dev_info *inode_to_bdi(struct inode *inode) >> +{ >> + if (!inode || !inode->i_sb) >> + return __inode_to_bdi(inode); >> + >> + return inode->i_sb->s_bdi; >> +} > This is wrong for block-device inodes, isn't it? Rrr yes my bad I meant +struct backing_dev_info *inode_to_bdi(struct inode *inode) +{ + if (!inode || !inode->i_sb || !inode->i_sb->s_bdi) + return __inode_to_bdi(inode); + + return inode->i_sb->s_bdi; +} I was hopping that blockdev_superblock->s_bdi == NULL because what sb_is_blkdev_sb() is doing is checking for blockdev_superblock. >>From code audit I do not see where it might be set but I might have missed it. Thanks Jan Boaz > > Honza >