mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Tse-Chia.Chang" <merqqcury@gmail.com>
To: snitzer@kernel.org
Cc: agk@redhat.com, mpatocka@redhat.com, dm-devel@lists.linux.dev,
	linux-kernel@vger.kernel.org,
	"Tse-Chia.Chang" <merqqcury@gmail.com>
Subject: [PATCH] md: Reduce flag condition
Date: Mon, 13 May 2024 14:47:00 +0800	[thread overview]
Message-ID: <20240513064700.88178-1-merqqcury@gmail.com> (raw)

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.

Signed-off-by: Tse-Chia.Chang <merqqcury@gmail.com>
---
 drivers/md/dm-kcopyd.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/md/dm-kcopyd.c b/drivers/md/dm-kcopyd.c
index 6ea75436a..7a21875b1 100644
--- a/drivers/md/dm-kcopyd.c
+++ b/drivers/md/dm-kcopyd.c
@@ -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) {
-- 
2.34.1


                 reply	other threads:[~2024-05-13  6:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240513064700.88178-1-merqqcury@gmail.com \
    --to=merqqcury@gmail.com \
    --cc=agk@redhat.com \
    --cc=dm-devel@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpatocka@redhat.com \
    --cc=snitzer@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®