Commit cc2a1713 authored by Gao Xiang's avatar Gao Xiang

erofs: get rid of the leftover PAGE_SIZE in dir.c

Convert the last hardcoded PAGE_SIZEs of uncompressed cases.
Reviewed-by: default avatarJeffle Xu <jefflexu@linux.alibaba.com>
Signed-off-by: default avatarGao Xiang <hsiangkao@linux.alibaba.com>
Link: https://lore.kernel.org/r/20220619150940.121005-1-hsiangkao@linux.alibaba.com
parent de8a801a
...@@ -90,7 +90,7 @@ static int erofs_readdir(struct file *f, struct dir_context *ctx) ...@@ -90,7 +90,7 @@ static int erofs_readdir(struct file *f, struct dir_context *ctx)
nameoff = le16_to_cpu(de->nameoff); nameoff = le16_to_cpu(de->nameoff);
if (nameoff < sizeof(struct erofs_dirent) || if (nameoff < sizeof(struct erofs_dirent) ||
nameoff >= PAGE_SIZE) { nameoff >= EROFS_BLKSIZ) {
erofs_err(dir->i_sb, erofs_err(dir->i_sb,
"invalid de[0].nameoff %u @ nid %llu", "invalid de[0].nameoff %u @ nid %llu",
nameoff, EROFS_I(dir)->nid); nameoff, EROFS_I(dir)->nid);
...@@ -99,7 +99,7 @@ static int erofs_readdir(struct file *f, struct dir_context *ctx) ...@@ -99,7 +99,7 @@ static int erofs_readdir(struct file *f, struct dir_context *ctx)
} }
maxsize = min_t(unsigned int, maxsize = min_t(unsigned int,
dirsize - ctx->pos + ofs, PAGE_SIZE); dirsize - ctx->pos + ofs, EROFS_BLKSIZ);
/* search dirents at the arbitrary position */ /* search dirents at the arbitrary position */
if (initial) { if (initial) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment