Lines Matching refs:bdev_file
40 struct file *bdev_file; member
58 struct address_space *mapping = dev->bdev_file->f_mapping; in _block2mtd_erase()
108 struct address_space *mapping = dev->bdev_file->f_mapping; in block2mtd_read()
143 struct address_space *mapping = dev->bdev_file->f_mapping; in _block2mtd_write()
198 sync_blockdev(file_bdev(dev->bdev_file)); in block2mtd_sync()
210 if (dev->bdev_file) { in block2mtd_free_device()
211 invalidate_mapping_pages(dev->bdev_file->f_mapping, 0, -1); in block2mtd_free_device()
212 bdev_fput(dev->bdev_file); in block2mtd_free_device()
225 struct file *bdev_file = ERR_PTR(-ENODEV); in mdtblock_early_get_bdev() local
233 return bdev_file; in mdtblock_early_get_bdev()
252 bdev_file = bdev_file_open_by_dev(devt, mode, dev, NULL); in mdtblock_early_get_bdev()
253 if (!IS_ERR(bdev_file)) in mdtblock_early_get_bdev()
258 return bdev_file; in mdtblock_early_get_bdev()
265 struct file *bdev_file; in add_device() local
279 bdev_file = bdev_file_open_by_path(devname, mode, dev, NULL); in add_device()
280 if (IS_ERR(bdev_file)) in add_device()
281 bdev_file = mdtblock_early_get_bdev(devname, mode, timeout, in add_device()
283 if (IS_ERR(bdev_file)) { in add_device()
287 dev->bdev_file = bdev_file; in add_device()
288 bdev = file_bdev(bdev_file); in add_device()