Commit 0ba4566c authored by Matthew Wilcox (Oracle)'s avatar Matthew Wilcox (Oracle) Committed by Jens Axboe

bdev: Improve lookup_bdev documentation

Add a Context section and rewrite the rest to be clearer.
Signed-off-by: default avatarMatthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarNikolay Borisov <nborisov@suse.com>
Link: https://lore.kernel.org/r/20211213171113.3097631-1-willy@infradead.orgSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 17f81f9d
...@@ -955,15 +955,15 @@ void blkdev_put(struct block_device *bdev, fmode_t mode) ...@@ -955,15 +955,15 @@ void blkdev_put(struct block_device *bdev, fmode_t mode)
EXPORT_SYMBOL(blkdev_put); EXPORT_SYMBOL(blkdev_put);
/** /**
* lookup_bdev - lookup a struct block_device by name * lookup_bdev() - Look up a struct block_device by name.
* @pathname: special file representing the block device * @pathname: Name of the block device in the filesystem.
* @dev: return value of the block device's dev_t * @dev: Pointer to the block device's dev_t, if found.
* *
* Lookup the block device's dev_t at @pathname in the current * Lookup the block device's dev_t at @pathname in the current
* namespace if possible and return it by @dev. * namespace if possible and return it in @dev.
* *
* RETURNS: * Context: May sleep.
* 0 if succeeded, errno otherwise. * Return: 0 if succeeded, negative errno otherwise.
*/ */
int lookup_bdev(const char *pathname, dev_t *dev) int lookup_bdev(const char *pathname, dev_t *dev)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment