[Devel] [PATCH RH9 5/9] dm-qcow2: Remove arg in parse_metadata()

Kirill Tkhai ktkhai at virtuozzo.com
Sun Mar 6 13:28:22 MSK 2022


Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 drivers/md/dm-qcow2-map.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/md/dm-qcow2-map.c b/drivers/md/dm-qcow2-map.c
index 4edd63e47a3d..6a600b1c870f 100644
--- a/drivers/md/dm-qcow2-map.c
+++ b/drivers/md/dm-qcow2-map.c
@@ -1924,8 +1924,9 @@ static int handle_r1r2_maps(struct qcow2 *qcow2, loff_t pos, struct qio **qio,
  * till some event: reading of md page, end of writeback, etc.
  */
 static int parse_metadata(struct qcow2 *qcow2, struct qio **qio,
-			  struct qcow2_map *map, bool write)
+			  struct qcow2_map *map)
 {
+	bool write = op_is_write((*qio)->bi_op);
 	struct md_page *md;
 	u64 pos;
 	s64 ret;
@@ -3239,7 +3240,7 @@ static int handle_metadata(struct qcow2 *qcow2, struct qio **qio,
 	bool write = op_is_write((*qio)->bi_op);
 	int ret;
 
-	ret = parse_metadata(qcow2, qio, map, write);
+	ret = parse_metadata(qcow2, qio, map);
 	if (ret < 0 || !*qio) /* Error or postponed */
 		goto check_err;
 




More information about the Devel mailing list