Skip to contentSkip to conversation

md: Reduce flag condition

PATCH New Tse-Chia.Chang 1 participant 1 message May 13, 2024 Device mapper

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 md: Reduce flag condition

Clear DM_COPYD_IGNORE_ERROR will have no effect regardless of whether it is set in the flags. Therefore, this patch reduces one conditional check.

---
 drivers/md/dm-kcopyd.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/md/dm-kcopyd.c +1 -2
index 6ea75436a..7a21875b1 100644
@@ -817,8 +817,7 @@ void dm_kcopyd_copy(struct dm_kcopyd_client *kc, struct dm_io_region *from,
 	/*
 	 * If we need to write sequentially, errors cannot be ignored.
 	 */
-	if (job->flags & BIT(DM_KCOPYD_WRITE_SEQ) &&
-	    job->flags & BIT(DM_KCOPYD_IGNORE_ERROR))
+	if (job->flags & BIT(DM_KCOPYD_WRITE_SEQ))
 		job->flags &= ~BIT(DM_KCOPYD_IGNORE_ERROR);
 
 	if (from) {
Signature · 1 line
2.34.1