Use qio_list_pop().
Signed-off-by: Kirill Tkhai <[email protected]>
---
drivers/md/dm-qcow2-map.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/md/dm-qcow2-map.c b/drivers/md/dm-qcow2-map.c
index e14d083fd532..758b03a02807 100644
--- a/drivers/md/dm-qcow2-map.c
+++ b/drivers/md/dm-qcow2-map.c
@@ -3478,9 +3478,7 @@ static int complete_metadata_writeback(struct qcow2
*qcow2)
if (unlikely(fsync_ret))
pr_err_ratelimited("qcow2: can't sync md: %d\n", fsync_ret);
- while (!list_empty(&wb_list)) {
- qio = list_first_entry(&wb_list, struct qio, link);
- list_del(&qio->link);
+ while ((qio = qio_list_pop(&wb_list)) != NULL) {
md = qio->ext->md;
qvec = qio->data;
ret = qio->ret;
_______________________________________________
Devel mailing list
[email protected]
https://lists.openvz.org/mailman/listinfo/devel