mtd: Convert to dynamically allocated bdi infrastructure
authorJan Kara <jack@suse.cz>
Wed, 12 Apr 2017 10:24:37 +0000 (12:24 +0200)
committerJens Axboe <axboe@fb.com>
Thu, 20 Apr 2017 18:09:55 +0000 (12:09 -0600)
commitfa06052d637bf3a76f18cd2304048b866af4096e
tree7516fc2e1008907e50a7f860d3f21aee65638223
parentedd3ba94c4e5ef6ec045d5730d365d557fb54f98
mtd: Convert to dynamically allocated bdi infrastructure

MTD already allocates backing_dev_info dynamically. Convert it to use
generic infrastructure for this including proper refcounting. We drop
mtd->backing_dev_info as its only use was to pass mtd_bdi pointer from
one file into another and if we wanted to keep that in a clean way, we'd
have to make mtd hold and drop bdi reference as needed which seems
pointless for passing one global pointer...

CC: David Woodhouse <dwmw2@infradead.org>
CC: Brian Norris <computersforpeace@gmail.com>
CC: linux-mtd@lists.infradead.org
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/mtd/mtdcore.c
drivers/mtd/mtdsuper.c
include/linux/mtd/mtd.h