From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Subject: Re: [TRIVIAL PATCH] fs-writeback: Replace sb->s_type->name with sb->s_id to get name of super_block. Date: Tue, 8 Oct 2013 15:50:24 -0700 Message-ID: <20131008155024.6b151ac2b7af10cf55ddb722@linux-foundation.org> References: <201309131058211985620@gmail.com> <20131008154853.95a6128ee41b665474e58b0e@linux-foundation.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit To: majianpeng , viro , linux-fsdevel Return-path: Received: from mail.linuxfoundation.org ([140.211.169.12]:44936 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755341Ab3JHWu1 (ORCPT ); Tue, 8 Oct 2013 18:50:27 -0400 In-Reply-To: <20131008154853.95a6128ee41b665474e58b0e@linux-foundation.org> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Tue, 8 Oct 2013 15:48:53 -0700 Andrew Morton wrote: > On Fri, 13 Sep 2013 10:58:23 +0800 majianpeng wrote: > > > Signed-off-by: Jianpeng Ma > > --- > > fs/fs-writeback.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c > > index 30f6f27..464b9c8 100644 > > --- a/fs/fs-writeback.c > > +++ b/fs/fs-writeback.c > > @@ -69,7 +69,7 @@ static inline struct backing_dev_info *inode_to_bdi(struct inode *inode) > > { > > struct super_block *sb = inode->i_sb; > > > > - if (strcmp(sb->s_type->name, "bdev") == 0) > > + if (strcmp(sb->s_id, "bdev") == 0) > > return inode->i_mapping->backing_dev_info; > > > > return sb->s_bdi; > > inode_to_bdi() doesn't exist any more err, actually it does exist, but has already been converted to use sb_is_blkdev_sb(). > but similar code exists in the > remarkably named block_dump___mark_inode_dirty(). > > Using strcmp() is nasty. Can't we use sb_is_blkdev_sb() in there? This.