Commit bab5d988 authored by Igor Stoppa's avatar Igor Stoppa Committed by Mike Snitzer
Browse files

dm: remove unnecessary unlikely() around WARN_ON_ONCE()



WARN_ON() already contains an unlikely(), so it's not necessary to
wrap it into another.

Signed-off-by: default avatarIgor Stoppa <igor.stoppa@huawei.com>
Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
parent 092b5648
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1200,7 +1200,7 @@ static void queue_demotion(struct smq_policy *mq)
	struct policy_work work;
	struct entry *e;

	if (unlikely(WARN_ON_ONCE(!mq->migrations_allowed)))
	if (WARN_ON_ONCE(!mq->migrations_allowed))
		return;

	e = q_peek(&mq->clean, mq->clean.nr_levels / 2, true);
+1 −1
Original line number Diff line number Diff line
@@ -1666,7 +1666,7 @@ static blk_qc_t __process_bio(struct mapped_device *md,
		 * Defend against IO still getting in during teardown
		 * - as was seen for a time with nvme-fcloop
		 */
		if (unlikely(WARN_ON_ONCE(!ti || !dm_target_is_valid(ti)))) {
		if (WARN_ON_ONCE(!ti || !dm_target_is_valid(ti))) {
			error = -EIO;
			goto out;
		}