summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2017-04-12 06:24:42 -0400
committerJens Axboe <axboe@fb.com>2017-04-20 14:09:55 -0400
commit95fe66de9f0de24f08e875a67722a3d612cd9f2f (patch)
treeb762fe4b2b8e3d4d92eb7c467323ad19e191bc99 /fs
parent7fbbe972c3ec63a3391997e0cef09964f9236088 (diff)
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>
Diffstat (limited to 'fs')
-rw-r--r--fs/gfs2/ops_fstype.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c
index b108e7ba81af..e6b6f97d0fc1 100644
--- a/fs/gfs2/ops_fstype.c
+++ b/fs/gfs2/ops_fstype.c
@@ -23,6 +23,7 @@
23#include <linux/quotaops.h> 23#include <linux/quotaops.h>
24#include <linux/lockdep.h> 24#include <linux/lockdep.h>
25#include <linux/module.h> 25#include <linux/module.h>
26#include <linux/backing-dev.h>
26 27
27#include "gfs2.h" 28#include "gfs2.h"
28#include "incore.h" 29#include "incore.h"
@@ -1222,12 +1223,8 @@ static int set_gfs2_super(struct super_block *s, void *data)
1222{ 1223{
1223 s->s_bdev = data; 1224 s->s_bdev = data;
1224 s->s_dev = s->s_bdev->bd_dev; 1225 s->s_dev = s->s_bdev->bd_dev;
1225 1226 s->s_bdi = bdi_get(s->s_bdev->bd_bdi);
1226 /* 1227 s->s_iflags |= SB_I_DYNBDI;
1227 * We set the bdi here to the queue backing, file systems can
1228 * overwrite this in ->fill_super()
1229 */
1230 s->s_bdi = bdev_get_queue(s->s_bdev)->backing_dev_info;
1231 return 0; 1228 return 0;
1232} 1229}
1233 1230