Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

gfs2: Convert to properly refcounting bdi

Similarly to set_bdev_super() GFS2 just used block device reference to
bdi. Convert it to properly getting bdi reference. The reference will
get automatically dropped on superblock destruction.

CC: Steven Whitehouse <swhiteho@redhat.com>
CC: Bob Peterson <rpeterso@redhat.com>
CC: cluster-devel@redhat.com
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jens Axboe <axboe@fb.com>

authored by

Jan Kara and committed by
Jens Axboe
95fe66de 7fbbe972

+3 -6
+3 -6
fs/gfs2/ops_fstype.c
··· 23 23 #include <linux/quotaops.h> 24 24 #include <linux/lockdep.h> 25 25 #include <linux/module.h> 26 + #include <linux/backing-dev.h> 26 27 27 28 #include "gfs2.h" 28 29 #include "incore.h" ··· 1223 1222 { 1224 1223 s->s_bdev = data; 1225 1224 s->s_dev = s->s_bdev->bd_dev; 1226 - 1227 - /* 1228 - * We set the bdi here to the queue backing, file systems can 1229 - * overwrite this in ->fill_super() 1230 - */ 1231 - s->s_bdi = bdev_get_queue(s->s_bdev)->backing_dev_info; 1225 + s->s_bdi = bdi_get(s->s_bdev->bd_bdi); 1226 + s->s_iflags |= SB_I_DYNBDI; 1232 1227 return 0; 1233 1228 } 1234 1229