Skip to content

Commit

Permalink
block: use disk_part_iter_exit in disk_part_iter_next
Browse files Browse the repository at this point in the history
Call disk_part_iter_exit in disk_part_iter_next instead of duplicating
the functionality.

Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Greg Kroah-Hartman <[email protected]>
Reviewed-by: Jan Kara <[email protected]>
Reviewed-by: Hannes Reinecke <[email protected]>
Reviewed-by: Johannes Thumshirn <[email protected]>
Acked-by: Tejun Heo <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
Christoph Hellwig authored and axboe committed Dec 1, 2020
1 parent 8d65269 commit e79319a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions block/genhd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit e79319a

Please sign in to comment.