summaryrefslogtreecommitdiff
path: root/block/blk.h
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2024-04-29 02:01:39 +0300
committerAl Viro <viro@zeniv.linux.org.uk>2024-05-03 09:36:21 +0300
commit2638c20876734f986fd91cfbe196483835ed7095 (patch)
tree1cb487635c21b1a5bc1a1688f7054dceaba7c4cb /block/blk.h
parent186ddac2072a8134798d72635d1ed0f29889369d (diff)
downloadlinux-2638c20876734f986fd91cfbe196483835ed7095.tar.xz
missing helpers: bdev_unhash(), bdev_drop()
bdev_unhash(): make block device invisible to lookups by device number bdev_drop(): drop reference to associated inode. Both are internal, for use by genhd and partition-related code - similar to bdev_add(). The logics in there (especially the lifetime-related parts of it) ought to be cleaned up, but that's a separate story; here we just encapsulate getting to associated inode. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'block/blk.h')
-rw-r--r--block/blk.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/block/blk.h b/block/blk.h
index d9f584984bc4..e3347e1030d5 100644
--- a/block/blk.h
+++ b/block/blk.h
@@ -428,6 +428,8 @@ static inline int blkdev_zone_mgmt_ioctl(struct block_device *bdev,
struct block_device *bdev_alloc(struct gendisk *disk, u8 partno);
void bdev_add(struct block_device *bdev, dev_t dev);
+void bdev_unhash(struct block_device *bdev);
+void bdev_drop(struct block_device *bdev);
int blk_alloc_ext_minor(void);
void blk_free_ext_minor(unsigned int minor);