summaryrefslogtreecommitdiff
path: root/fs/erofs/utils.c
diff options
context:
space:
mode:
authorGao Xiang <gaoxiang25@huawei.com>2019-08-29 19:38:27 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-08-30 10:02:02 +0300
commit8d8a09b093d7073465c824f74caf315c073d3875 (patch)
tree787aaad384401dd763dc4541684055b88563c1bc /fs/erofs/utils.c
parent5cf89673645f7edfa075afc9e1d531db24706329 (diff)
downloadlinux-8d8a09b093d7073465c824f74caf315c073d3875.tar.xz
erofs: remove all likely/unlikely annotations
As Dan Carpenter suggested [1], I have to remove all erofs likely/unlikely annotations. [1] https://lore.kernel.org/linux-fsdevel/20190829154346.GK23584@kadam/ Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Gao Xiang <gaoxiang25@huawei.com> Link: https://lore.kernel.org/r/20190829163827.203274-1-gaoxiang25@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/erofs/utils.c')
-rw-r--r--fs/erofs/utils.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/erofs/utils.c b/fs/erofs/utils.c
index 1dd041aa0f5a..d92b3e753a6f 100644
--- a/fs/erofs/utils.c
+++ b/fs/erofs/utils.c
@@ -46,14 +46,14 @@ static int erofs_workgroup_get(struct erofs_workgroup *grp)
repeat:
o = erofs_wait_on_workgroup_freezed(grp);
- if (unlikely(o <= 0))
+ if (o <= 0)
return -1;
- if (unlikely(atomic_cmpxchg(&grp->refcount, o, o + 1) != o))
+ if (atomic_cmpxchg(&grp->refcount, o, o + 1) != o)
goto repeat;
/* decrease refcount paired by erofs_workgroup_put */
- if (unlikely(o == 1))
+ if (o == 1)
atomic_long_dec(&erofs_global_shrink_cnt);
return 0;
}
@@ -91,7 +91,7 @@ int erofs_register_workgroup(struct super_block *sb,
int err;
/* grp shouldn't be broken or used before */
- if (unlikely(atomic_read(&grp->refcount) != 1)) {
+ if (atomic_read(&grp->refcount) != 1) {
DBG_BUGON(1);
return -EINVAL;
}
@@ -113,7 +113,7 @@ int erofs_register_workgroup(struct super_block *sb,
__erofs_workgroup_get(grp);
err = radix_tree_insert(&sbi->workstn_tree, grp->index, grp);
- if (unlikely(err))
+ if (err)
/*
* it's safe to decrease since the workgroup isn't visible
* and refcount >= 2 (cannot be freezed).
@@ -212,7 +212,7 @@ repeat:
continue;
++freed;
- if (unlikely(!--nr_shrink))
+ if (!--nr_shrink)
break;
}
xa_unlock(&sbi->workstn_tree);