projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
de8a801
)
erofs: get rid of the leftover PAGE_SIZE in dir.c
author
Gao Xiang
<hsiangkao@linux.alibaba.com>
Sun, 19 Jun 2022 15:09:40 +0000
(23:09 +0800)
committer
Gao Xiang
<hsiangkao@linux.alibaba.com>
Fri, 22 Jul 2022 13:46:26 +0000
(21:46 +0800)
Convert the last hardcoded PAGE_SIZEs of uncompressed cases.
Reviewed-by: Jeffle Xu <jefflexu@linux.alibaba.com>
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Link:
https://lore.kernel.org/r/20220619150940.121005-1-hsiangkao@linux.alibaba.com
fs/erofs/dir.c
patch
|
blob
|
history
diff --git
a/fs/erofs/dir.c
b/fs/erofs/dir.c
index 18e59821c5974179ebb6a8389531a89fdecc1ec4..723f5223a4fabf4dabc92eb1c1cd38c577f057ff 100644
(file)
--- a/
fs/erofs/dir.c
+++ b/
fs/erofs/dir.c
@@
-90,7
+90,7
@@
static int erofs_readdir(struct file *f, struct dir_context *ctx)
nameoff = le16_to_cpu(de->nameoff);
if (nameoff < sizeof(struct erofs_dirent) ||
- nameoff >=
PAGE_SIZE
) {
+ nameoff >=
EROFS_BLKSIZ
) {
erofs_err(dir->i_sb,
"invalid de[0].nameoff %u @ nid %llu",
nameoff, EROFS_I(dir)->nid);
@@
-99,7
+99,7
@@
static int erofs_readdir(struct file *f, struct dir_context *ctx)
}
maxsize = min_t(unsigned int,
- dirsize - ctx->pos + ofs,
PAGE_SIZE
);
+ dirsize - ctx->pos + ofs,
EROFS_BLKSIZ
);
/* search dirents at the arbitrary position */
if (initial) {