提交 e79319af 编写于 作者: C Christoph Hellwig 提交者: Jens Axboe

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: NChristoph Hellwig <hch@lst.de>
Reviewed-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: NJan Kara <jack@suse.cz>
Reviewed-by: NHannes Reinecke <hare@suse.de>
Reviewed-by: NJohannes Thumshirn <johannes.thumshirn@wdc.com>
Acked-by: NTejun Heo <tj@kernel.org>
Signed-off-by: NJens Axboe <axboe@kernel.dk>
上级 8d65269f
......@@ -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();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册