@@ -1828,10 +1828,11 @@ const struct file_operations def_blk_fops = {
/**
* lookup_bdev - lookup a struct block_device by name
* @pathname: special file representing the block device
+ * @dev: returns the dev_t for the device
*
- * Get a reference to the blockdevice at @pathname in the current
- * namespace if possible and return it. Return ERR_PTR(error)
- * otherwise.
+ * Find the dev_t for the block device at @pathname. Returns 0 if there is a
+ * block device at @pathname, or a negative errno value if not. The dev_t for
+ * the block device is placed in the variable pointed to by the @dev parameter.
*/
int lookup_bdev(const char *pathname, dev_t *dev)
{
Document the new dev parameter and the changed return value convention. Signed-off-by: Christoph Hellwig <hch@lst.de> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Fixes: 4e7b5671c6a8 ("block: remove i_bdev") --- fs/block_dev.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)