1
0
Fork 0

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: Igor Stoppa <igor.stoppa@huawei.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
hifive-unleashed-5.1
Igor Stoppa 2018-09-07 20:03:37 +03:00 committed by Mike Snitzer
parent 092b564876
commit bab5d98884
2 changed files with 2 additions and 2 deletions

View 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);

View 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;
}