[Devel] [PATCH RH8 01/14] dm-qcow2: Simplify complete_metadata_writeback()
Kirill Tkhai
ktkhai at virtuozzo.com
Tue Jul 27 11:28:47 MSK 2021
Use qio_list_pop().
Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
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;
More information about the Devel
mailing list