diff options
author | Gao Xiang <gaoxiang25@huawei.com> | 2019-08-29 18:38:27 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-08-30 09:02:02 +0200 |
commit | 8d8a09b093d7073465c824f74caf315c073d3875 (patch) | |
tree | 787aaad384401dd763dc4541684055b88563c1bc /fs/erofs/dir.c | |
parent | MAINTAINERS: fix up exfat directory location (diff) | |
download | linux-8d8a09b093d7073465c824f74caf315c073d3875.tar.xz linux-8d8a09b093d7073465c824f74caf315c073d3875.zip |
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/dir.c')
-rw-r--r-- | fs/erofs/dir.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/erofs/dir.c b/fs/erofs/dir.c index 1976e60e5174..6a5b43f7fb29 100644 --- a/fs/erofs/dir.c +++ b/fs/erofs/dir.c @@ -45,8 +45,8 @@ static int erofs_fill_dentries(struct inode *dir, struct dir_context *ctx, de_namelen = le16_to_cpu(de[1].nameoff) - nameoff; /* a corrupted entry is found */ - if (unlikely(nameoff + de_namelen > maxsize || - de_namelen > EROFS_NAME_LEN)) { + if (nameoff + de_namelen > maxsize || + de_namelen > EROFS_NAME_LEN) { errln("bogus dirent @ nid %llu", EROFS_V(dir)->nid); DBG_BUGON(1); return -EFSCORRUPTED; @@ -94,8 +94,8 @@ static int erofs_readdir(struct file *f, struct dir_context *ctx) nameoff = le16_to_cpu(de->nameoff); - if (unlikely(nameoff < sizeof(struct erofs_dirent) || - nameoff >= PAGE_SIZE)) { + if (nameoff < sizeof(struct erofs_dirent) || + nameoff >= PAGE_SIZE) { errln("%s, invalid de[0].nameoff %u @ nid %llu", __func__, nameoff, EROFS_V(dir)->nid); err = -EFSCORRUPTED; @@ -106,11 +106,11 @@ static int erofs_readdir(struct file *f, struct dir_context *ctx) dirsize - ctx->pos + ofs, PAGE_SIZE); /* search dirents at the arbitrary position */ - if (unlikely(initial)) { + if (initial) { initial = false; ofs = roundup(ofs, sizeof(struct erofs_dirent)); - if (unlikely(ofs >= nameoff)) + if (ofs >= nameoff) goto skip_this; } @@ -123,7 +123,7 @@ skip_this: ctx->pos = blknr_to_addr(i) + ofs; - if (unlikely(err)) + if (err) break; ++i; ofs = 0; |