]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
nilfs2: set up s_bdi like the generic mount_bdev code
authorChristoph Hellwig <hch@lst.de>
Wed, 14 Jan 2015 09:42:35 +0000 (10:42 +0100)
committerJens Axboe <axboe@fb.com>
Tue, 20 Jan 2015 21:03:02 +0000 (14:03 -0700)
mapping->backing_dev_info will go away, so don't rely on it.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Reviewed-by: Tejun Heo <tj@kernel.org>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jens Axboe <axboe@fb.com>
fs/nilfs2/super.c

index 2e5b3ec85b8f62c967e785697449c773fe0e1337..3d4bbac36beaff7719e1d023cf4852dd1fd2cd15 100644 (file)
@@ -1057,7 +1057,6 @@ nilfs_fill_super(struct super_block *sb, void *data, int silent)
 {
        struct the_nilfs *nilfs;
        struct nilfs_root *fsroot;
-       struct backing_dev_info *bdi;
        __u64 cno;
        int err;
 
@@ -1077,8 +1076,7 @@ nilfs_fill_super(struct super_block *sb, void *data, int silent)
        sb->s_time_gran = 1;
        sb->s_max_links = NILFS_LINK_MAX;
 
-       bdi = sb->s_bdev->bd_inode->i_mapping->backing_dev_info;
-       sb->s_bdi = bdi ? : &default_backing_dev_info;
+       sb->s_bdi = &bdev_get_queue(sb->s_bdev)->backing_dev_info;
 
        err = load_nilfs(nilfs, sb);
        if (err)