Commit 95fe66de authored by Jan Kara's avatar Jan Kara Committed by Jens Axboe

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: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarJan Kara <jack@suse.cz>
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
parent 7fbbe972
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include <linux/quotaops.h> #include <linux/quotaops.h>
#include <linux/lockdep.h> #include <linux/lockdep.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/backing-dev.h>
#include "gfs2.h" #include "gfs2.h"
#include "incore.h" #include "incore.h"
...@@ -1222,12 +1223,8 @@ static int set_gfs2_super(struct super_block *s, void *data) ...@@ -1222,12 +1223,8 @@ static int set_gfs2_super(struct super_block *s, void *data)
{ {
s->s_bdev = data; s->s_bdev = data;
s->s_dev = s->s_bdev->bd_dev; s->s_dev = s->s_bdev->bd_dev;
s->s_bdi = bdi_get(s->s_bdev->bd_bdi);
/* s->s_iflags |= SB_I_DYNBDI;
* We set the bdi here to the queue backing, file systems can
* overwrite this in ->fill_super()
*/
s->s_bdi = bdev_get_queue(s->s_bdev)->backing_dev_info;
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment