btt.c (03ab8e6297acd1bc0eedaa050e2a1635c576fd11) | btt.c (8b9ab62662048a3274361c7e5f64037c2c133e2c) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * Block Translation Table 4 * Copyright (c) 2014-2015, Intel Corporation. 5 */ 6#include <linux/highmem.h> 7#include <linux/debugfs.h> 8#include <linux/blkdev.h> --- 1534 unchanged lines hidden (view full) --- 1543 goto out_cleanup_disk; 1544 1545 btt->nd_btt->size = btt->nlba * (u64)btt->sector_size; 1546 nvdimm_check_and_set_ro(btt->btt_disk); 1547 1548 return 0; 1549 1550out_cleanup_disk: | 1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * Block Translation Table 4 * Copyright (c) 2014-2015, Intel Corporation. 5 */ 6#include <linux/highmem.h> 7#include <linux/debugfs.h> 8#include <linux/blkdev.h> --- 1534 unchanged lines hidden (view full) --- 1543 goto out_cleanup_disk; 1544 1545 btt->nd_btt->size = btt->nlba * (u64)btt->sector_size; 1546 nvdimm_check_and_set_ro(btt->btt_disk); 1547 1548 return 0; 1549 1550out_cleanup_disk: |
1551 blk_cleanup_disk(btt->btt_disk); | 1551 put_disk(btt->btt_disk); |
1552 return rc; 1553} 1554 1555static void btt_blk_cleanup(struct btt *btt) 1556{ 1557 del_gendisk(btt->btt_disk); | 1552 return rc; 1553} 1554 1555static void btt_blk_cleanup(struct btt *btt) 1556{ 1557 del_gendisk(btt->btt_disk); |
1558 blk_cleanup_disk(btt->btt_disk); | 1558 put_disk(btt->btt_disk); |
1559} 1560 1561/** 1562 * btt_init - initialize a block translation table for the given device 1563 * @nd_btt: device with BTT geometry and backing device info 1564 * @rawsize: raw size in bytes of the backing device 1565 * @lbasize: lba size of the backing device 1566 * @uuid: A uuid for the backing device - this is stored on media --- 173 unchanged lines hidden --- | 1559} 1560 1561/** 1562 * btt_init - initialize a block translation table for the given device 1563 * @nd_btt: device with BTT geometry and backing device info 1564 * @rawsize: raw size in bytes of the backing device 1565 * @lbasize: lba size of the backing device 1566 * @uuid: A uuid for the backing device - this is stored on media --- 173 unchanged lines hidden --- |