[PATCH 23/44] block: remove i_bdev

Jan Kara jack at suse.cz
Thu Nov 26 10:45:27 EST 2020


On Thu 26-11-20 14:04:01, Christoph Hellwig wrote:
> Switch the block device lookup interfaces to directly work with a dev_t
> so that struct block_device references are only acquired by the
> blkdev_get variants (and the blk-cgroup special case).  This means that
> we now don't need an extra reference in the inode and can generally
> simplify handling of struct block_device to keep the lookups contained
> in the core block layer code.
> 
> Signed-off-by: Christoph Hellwig <hch at lst.de>
> Acked-by: Tejun Heo <tj at kernel.org>
> Acked-by: Coly Li <colyli at suse.de>		[bcache]

Looks good to me. Just two nits about comments below. You can add:

Reviewed-by: Jan Kara <jack at suse.cz>

>  /**
> - * blkdev_get - open a block device
> - * @bdev: block_device to open
> + * blkdev_get_by_dev - open a block device by device number
> + * @dev: device number of block device to open
>   * @mode: FMODE_* mask
>   * @holder: exclusive holder identifier
>   *
> - * Open @bdev with @mode.  If @mode includes %FMODE_EXCL, @bdev is
> - * open with exclusive access.  Specifying %FMODE_EXCL with %NULL
> - * @holder is invalid.  Exclusive opens may nest for the same @holder.
> + * Open the block device described by device number @dev.  If @mode includes
> + * If @mode includes %FMODE_EXCL, the block device is opened with exclusive
      ^^^ twice "If @mode includes" - here and on previous line...

...
> @@ -776,19 +770,6 @@ struct super_block *__get_super(struct block_device *bdev, bool excl)
>  	return NULL;
>  }
>  
> -/**
> - *	get_super - get the superblock of a device
> - *	@bdev: device to get the superblock for
> - *
> - *	Scans the superblock list and finds the superblock of the file system
> - *	mounted on the device given. %NULL is returned if no match is found.
> - */

I think it would be nice to preserve this comment?

								Honza
-- 
Jan Kara <jack at suse.com>
SUSE Labs, CR



More information about the linux-mtd mailing list