]> git.baikalelectronics.ru Git - kernel.git/commit
erofs: update ctx->pos for every emitted dirent
authorHongnan Li <hongnan.li@linux.alibaba.com>
Fri, 22 Jul 2022 08:27:32 +0000 (16:27 +0800)
committerGao Xiang <hsiangkao@linux.alibaba.com>
Sun, 31 Jul 2022 14:26:29 +0000 (22:26 +0800)
commit69212245da78d1b6cca44606deb3a7ef64439c8c
treef99c34b9de7778f6fdb7a50c157191816822261c
parentf6d138c1f9c444ab5eb0c7661547c83f7dd649f5
erofs: update ctx->pos for every emitted dirent

erofs_readdir update ctx->pos after filling a batch of dentries
and it may cause dir/files duplication for NFS readdirplus which
depends on ctx->pos to fill dir correctly. So update ctx->pos for
every emitted dirent in erofs_fill_dentries to fix it.

Also fix the update of ctx->pos when the initial file position has
exceeded nameoff.

Fixes: 8f79521a05cd ("erofs: make filesystem exportable")
Signed-off-by: Hongnan Li <hongnan.li@linux.alibaba.com>
Signed-off-by: Jeffle Xu <jefflexu@linux.alibaba.com>
Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Link: https://lore.kernel.org/r/20220722082732.30935-1-jefflexu@linux.alibaba.com
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
fs/erofs/dir.c