From: Boaz Harrosh <boaz@plexistor.com>
To: Jan Kara <jack@suse.cz>
Cc: Zhao Lei <zhaolei@cn.fujitsu.com>,
'Christoph Hellwig' <hch@lst.de>,
linux-fsdevel@vger.kernel.org, 'Jens Axboe' <axboe@fb.com>,
'LKML' <linux-kernel@vger.kernel.org>
Subject: Re: Regression caused by using node_to_bdi()
Date: Mon, 13 Apr 2015 15:44:05 +0300 [thread overview]
Message-ID: <552BBA15.4040500@plexistor.com> (raw)
In-Reply-To: <20150413122110.GE3633@quack.suse.cz>
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
>
next prev parent reply other threads:[~2015-04-13 12:44 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-10 11:25 Regression caused by using node_to_bdi() Zhao Lei
2015-04-12 11:33 ` Boaz Harrosh
2015-04-12 14:39 ` Boaz Harrosh
2015-04-13 1:20 ` Zhao Lei
2015-04-13 7:00 ` Zhao Lei
2015-04-13 10:22 ` Zhao Lei
2015-04-13 12:31 ` Boaz Harrosh
2015-04-14 12:14 ` Zhao Lei
2015-04-13 12:21 ` Jan Kara
2015-04-13 12:44 ` Boaz Harrosh [this message]
2015-04-13 17:32 ` 'Christoph Hellwig'
2015-04-14 12:27 ` Zhao Lei
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=552BBA15.4040500@plexistor.com \
--to=boaz@plexistor.com \
--cc=axboe@fb.com \
--cc=hch@lst.de \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=zhaolei@cn.fujitsu.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).