]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
dm: remove unnecessary unlikely() around WARN_ON_ONCE()
authorIgor Stoppa <igor.stoppa@gmail.com>
Fri, 7 Sep 2018 17:03:37 +0000 (20:03 +0300)
committerMike Snitzer <snitzer@redhat.com>
Tue, 16 Oct 2018 18:34:59 +0000 (14:34 -0400)
WARN_ON() already contains an unlikely(), so it's not necessary to
wrap it into another.

Signed-off-by: Igor Stoppa <igor.stoppa@huawei.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-cache-policy-smq.c
drivers/md/dm.c

index 1b5b9ad9e492f30357990cf60878e76d03d51066..b61aac00ff40938c7b38f3ce67594baeb8cbf195 100644 (file)
@@ -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);
index bf36e2635ea7a9aa8705c9e05128330b2b0af4a0..1fbc28ab157c2be4bdcb28d722d1d169cb9931fd 100644 (file)
@@ -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;
                }