[PATCH 04/20] block: use disk_part_iter_exit in disk_part_iter_next
Jan Kara
jack at suse.cz
Wed Nov 18 09:19:27 EST 2020
On Wed 18-11-20 09:47:44, Christoph Hellwig wrote:
> Call disk_part_iter_exit in disk_part_iter_next instead of duplicating
> the functionality.
>
> Signed-off-by: Christoph Hellwig <hch at lst.de>
OK. You can add:
Reviewed-by: Jan Kara <jack at suse.cz>
Honza
> ---
> block/genhd.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/block/genhd.c b/block/genhd.c
> index 4e039524f92b8f..0bd9c41dd4cb69 100644
> --- a/block/genhd.c
> +++ b/block/genhd.c
> @@ -227,8 +227,7 @@ struct hd_struct *disk_part_iter_next(struct disk_part_iter *piter)
> int inc, end;
>
> /* put the last partition */
> - disk_put_part(piter->part);
> - piter->part = NULL;
> + disk_part_iter_exit(piter);
>
> /* get part_tbl */
> rcu_read_lock();
> --
> 2.29.2
>
--
Jan Kara <jack at suse.com>
SUSE Labs, CR
More information about the linux-mtd
mailing list