mirror of https://gitee.com/openkylin/linux.git
block: use disk_part_iter_exit in disk_part_iter_next
Call disk_part_iter_exit in disk_part_iter_next instead of duplicating the functionality. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Reviewed-by: Jan Kara <jack@suse.cz> Reviewed-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
8d65269fe8
commit
e79319af6d
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue