Message ID | 20170329105623.18241-20-jack@suse.cz (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Wed, Mar 29, 2017 at 12:56:17PM +0200, Jan Kara wrote: > Similarly to set_bdev_super() NILFS2 just used block device reference to > bdi. Convert it to properly getting bdi reference. The reference will > get automatically dropped on superblock destruction. I really wish we could get rid of this open coding in block based file systems.. Otherwise looks fine: Reviewed-by: Christoph Hellwig <hch@lst.de>
On Wed 12-04-17 01:17:46, Christoph Hellwig wrote: > On Wed, Mar 29, 2017 at 12:56:17PM +0200, Jan Kara wrote: > > Similarly to set_bdev_super() NILFS2 just used block device reference to > > bdi. Convert it to properly getting bdi reference. The reference will > > get automatically dropped on superblock destruction. > > I really wish we could get rid of this open coding in block based > file systems.. Well, nilfs has it because it has its own ->mount implementation (and similarly gfs2). If someone has idea how common code out of those could be factored out, bdi handling could be part of that... > Otherwise looks fine: > > Reviewed-by: Christoph Hellwig <hch@lst.de> Thanks. Honza
diff --git a/fs/nilfs2/super.c b/fs/nilfs2/super.c index e1872f36147f..feb796a38b8d 100644 --- a/fs/nilfs2/super.c +++ b/fs/nilfs2/super.c @@ -1068,7 +1068,8 @@ nilfs_fill_super(struct super_block *sb, void *data, int silent) sb->s_time_gran = 1; sb->s_max_links = NILFS_LINK_MAX; - sb->s_bdi = bdev_get_queue(sb->s_bdev)->backing_dev_info; + sb->s_bdi = bdi_get(sb->s_bdev->bd_bdi); + sb->s_iflags |= SB_I_DYNBDI; err = load_nilfs(nilfs, sb); if (err)
Similarly to set_bdev_super() NILFS2 just used block device reference to bdi. Convert it to properly getting bdi reference. The reference will get automatically dropped on superblock destruction. CC: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> CC: linux-nilfs@vger.kernel.org Signed-off-by: Jan Kara <jack@suse.cz> --- fs/nilfs2/super.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)