summaryrefslogtreecommitdiff
path: root/block/bdev.c
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2021-12-13 17:11:13 +0000
committerJens Axboe <axboe@kernel.dk>2021-12-13 11:29:16 -0700
commit0ba4566cd8a4e645b542e6ddbe3dd26c85ad2408 (patch)
treeac4d2bf59d1aa16eb250d23fc2f241a7a866b7c3 /block/bdev.c
parent17f81f9d4b41d57e474975c3a5ca2a2c4c01e2ec (diff)
downloadlwn-0ba4566cd8a4e645b542e6ddbe3dd26c85ad2408.tar.gz
lwn-0ba4566cd8a4e645b542e6ddbe3dd26c85ad2408.zip
bdev: Improve lookup_bdev documentation
Add a Context section and rewrite the rest to be clearer. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Nikolay Borisov <nborisov@suse.com> Link: https://lore.kernel.org/r/20211213171113.3097631-1-willy@infradead.org Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/bdev.c')
-rw-r--r--block/bdev.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/block/bdev.c b/block/bdev.c
index 587645231d60..8bf93a19041b 100644
--- a/block/bdev.c
+++ b/block/bdev.c
@@ -955,15 +955,15 @@ void blkdev_put(struct block_device *bdev, fmode_t mode)
EXPORT_SYMBOL(blkdev_put);
/**
- * lookup_bdev - lookup a struct block_device by name
- * @pathname: special file representing the block device
- * @dev: return value of the block device's dev_t
+ * lookup_bdev() - Look up a struct block_device by name.
+ * @pathname: Name of the block device in the filesystem.
+ * @dev: Pointer to the block device's dev_t, if found.
*
* 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:
- * 0 if succeeded, errno otherwise.
+ * Context: May sleep.
+ * Return: 0 if succeeded, negative errno otherwise.
*/
int lookup_bdev(const char *pathname, dev_t *dev)
{