Lines Matching refs:bdev
222 struct block_device *bdev = ERR_PTR(-ENODEV); in psblk_get_bdev() local
236 bdev = blkdev_get_by_path(blkdev, mode, holder); in psblk_get_bdev()
237 if (IS_ERR(bdev)) { in psblk_get_bdev()
243 bdev = blkdev_get_by_dev(devt, mode, holder); in psblk_get_bdev()
244 if (IS_ERR(bdev)) in psblk_get_bdev()
245 return bdev; in psblk_get_bdev()
248 nr_sects = part_nr_sects_read(bdev->bd_part); in psblk_get_bdev()
251 blkdev_put(bdev, mode); in psblk_get_bdev()
256 info->devt = bdev->bd_dev; in psblk_get_bdev()
258 info->start_sect = get_start_sect(bdev); in psblk_get_bdev()
261 return bdev; in psblk_get_bdev()
264 static void psblk_put_bdev(struct block_device *bdev, void *holder) in psblk_put_bdev() argument
270 if (!bdev) in psblk_put_bdev()
275 blkdev_put(bdev, mode); in psblk_put_bdev()
280 struct block_device *bdev = psblk_bdev; in psblk_generic_blk_read() local
286 if (!bdev) in psblk_generic_blk_read()
290 file.f_mapping = bdev->bd_inode->i_mapping; in psblk_generic_blk_read()
292 file.f_inode = bdev->bd_inode; in psblk_generic_blk_read()
305 struct block_device *bdev = psblk_bdev; in psblk_generic_blk_write() local
312 if (!bdev) in psblk_generic_blk_write()
320 file.f_mapping = bdev->bd_inode->i_mapping; in psblk_generic_blk_write()
322 file.f_inode = bdev->bd_inode; in psblk_generic_blk_write()
328 inode_lock(bdev->bd_inode); in psblk_generic_blk_write()
332 inode_unlock(bdev->bd_inode); in psblk_generic_blk_write()
364 struct block_device *bdev; in __register_pstore_blk() local
374 bdev = psblk_get_bdev(holder, &binfo); in __register_pstore_blk()
375 if (IS_ERR(bdev)) { in __register_pstore_blk()
377 return PTR_ERR(bdev); in __register_pstore_blk()
390 psblk_bdev = bdev; in __register_pstore_blk()
410 bdevname(bdev, bdev_name); in __register_pstore_blk()
418 psblk_put_bdev(bdev, holder); in __register_pstore_blk()