Re: [TRIVIAL PATCH] fs-writeback: Replace sb->s_type->name with sb->s_id to get name of super_block.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 13 Sep 2013 10:58:23 +0800 majianpeng <majianpeng@xxxxxxxxx> wrote:

> Signed-off-by: Jianpeng Ma <majianpeng@xxxxxxxxx>
> ---
>  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, 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?
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux