Commit 8d47aef43ba166bdd11d522307c61ab23aab61c3

Authored by Hirofumi Nakagawa
Committed by Artem Bityutskiy
1 parent 948cfb219b

UBIFS: remove unneeded unlikely()

IS_ERR() macro already has unlikely(), so do not use constructions
like 'if (unlikely(IS_ERR())'.

Signed-off-by: Hirofumi Nakagawa <hnakagawa@miraclelinux.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>

Showing 4 changed files with 9 additions and 9 deletions Side-by-side Diff

... ... @@ -901,11 +901,11 @@
901 901 * it is needed now for this commit.
902 902 */
903 903 lp = ubifs_lpt_lookup_dirty(c, lnum);
904   - if (unlikely(IS_ERR(lp)))
  904 + if (IS_ERR(lp))
905 905 return PTR_ERR(lp);
906 906 lp = ubifs_change_lp(c, lp, LPROPS_NC, LPROPS_NC,
907 907 lp->flags | LPROPS_INDEX, -1);
908   - if (unlikely(IS_ERR(lp)))
  908 + if (IS_ERR(lp))
909 909 return PTR_ERR(lp);
910 910 dbg_find("LEB %d, dirty %d and free %d flags %#x",
911 911 lp->lnum, lp->dirty, lp->free, lp->flags);
... ... @@ -653,7 +653,7 @@
653 653 */
654 654 while (1) {
655 655 lp = ubifs_fast_find_freeable(c);
656   - if (unlikely(IS_ERR(lp))) {
  656 + if (IS_ERR(lp)) {
657 657 err = PTR_ERR(lp);
658 658 goto out;
659 659 }
... ... @@ -665,7 +665,7 @@
665 665 if (err)
666 666 goto out;
667 667 lp = ubifs_change_lp(c, lp, c->leb_size, 0, lp->flags, 0);
668   - if (unlikely(IS_ERR(lp))) {
  668 + if (IS_ERR(lp)) {
669 669 err = PTR_ERR(lp);
670 670 goto out;
671 671 }
... ... @@ -680,7 +680,7 @@
680 680 /* Record index freeable LEBs for unmapping after commit */
681 681 while (1) {
682 682 lp = ubifs_fast_find_frdi_idx(c);
683   - if (unlikely(IS_ERR(lp))) {
  683 + if (IS_ERR(lp)) {
684 684 err = PTR_ERR(lp);
685 685 goto out;
686 686 }
... ... @@ -696,7 +696,7 @@
696 696 /* Don't release the LEB until after the next commit */
697 697 flags = (lp->flags | LPROPS_TAKEN) ^ LPROPS_INDEX;
698 698 lp = ubifs_change_lp(c, lp, c->leb_size, 0, flags, 1);
699   - if (unlikely(IS_ERR(lp))) {
  699 + if (IS_ERR(lp)) {
700 700 err = PTR_ERR(lp);
701 701 kfree(idx_gc);
702 702 goto out;
... ... @@ -284,7 +284,7 @@
284 284 }
285 285  
286 286 zn = copy_znode(c, znode);
287   - if (unlikely(IS_ERR(zn)))
  287 + if (IS_ERR(zn))
288 288 return zn;
289 289  
290 290 if (zbr->len) {
... ... @@ -1128,7 +1128,7 @@
1128 1128 ubifs_assert(znode == c->zroot.znode);
1129 1129 znode = dirty_cow_znode(c, &c->zroot);
1130 1130 }
1131   - if (unlikely(IS_ERR(znode)) || !p)
  1131 + if (IS_ERR(znode) || !p)
1132 1132 break;
1133 1133 ubifs_assert(path[p - 1] >= 0);
1134 1134 ubifs_assert(path[p - 1] < znode->child_cnt);
... ... @@ -446,7 +446,7 @@
446 446 int type;
447 447  
448 448 xent = ubifs_tnc_next_ent(c, &key, &nm);
449   - if (unlikely(IS_ERR(xent))) {
  449 + if (IS_ERR(xent)) {
450 450 err = PTR_ERR(xent);
451 451 break;
452 452 }