]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
bdev: Improve lookup_bdev documentation
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Mon, 13 Dec 2021 17:11:13 +0000 (17:11 +0000)
committerJens Axboe <axboe@kernel.dk>
Mon, 13 Dec 2021 18:29:16 +0000 (11:29 -0700)
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>
block/bdev.c

index 587645231d60e1ac27c6e913f107f3de5dcdaf80..8bf93a19041b7beb925069ae33b86891c4ade7f9 100644 (file)
@@ -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)
 {