linux-stable/fs/erofs
Hongnan Li e66205ee2d erofs: update ctx->pos for every emitted dirent
[ Upstream commit ecce9212d0 ]

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: 3e917cc305 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-08-17 15:14:21 +02:00
..
compress.h erofs: introduce z_erofs_fixup_insize 2021-12-29 06:42:07 +08:00
data.c Page cache changes for 5.19 2022-05-24 19:55:07 -07:00
decompressor.c erofs: avoid consecutive detection for Highmem memory 2022-08-17 15:14:16 +02:00
decompressor_lzma.c erofs: wake up all waiters after z_erofs_lzma_head ready 2022-08-17 15:14:16 +02:00
dir.c erofs: update ctx->pos for every emitted dirent 2022-08-17 15:14:21 +02:00
erofs_fs.h erofs: scan devices from device table 2022-05-18 00:11:21 +08:00
fscache.c Changes since last update: 2022-06-01 11:54:29 -07:00
inode.c erofs: leave compressed inodes unsupported in fscache mode for now 2022-05-29 15:34:54 +08:00
internal.h erofs: implement fscache-based data read for non-inline layout 2022-05-18 00:11:20 +08:00
Kconfig erofs: register fscache volume 2022-05-18 00:11:19 +08:00
Makefile erofs: register fscache volume 2022-05-18 00:11:19 +08:00
namei.c erofs: make filesystem exportable 2022-05-17 23:48:54 +08:00
pcpubuf.c erofs: get rid of ->lru usage 2021-10-25 08:22:59 +08:00
super.c Page cache changes for 5.19 2022-05-24 19:55:07 -07:00
sysfs.c erofs: add 'fsid' mount option 2022-05-18 00:11:21 +08:00
tagptr.h erofs: clean up file headers & footers 2021-06-08 00:41:24 +08:00
utils.c erofs: fix deadlock when shrink erofs slab 2021-11-23 14:58:16 +08:00
xattr.c erofs: use meta buffers for xattr operations 2022-01-04 23:47:08 +08:00
xattr.h erofs: use meta buffers for xattr operations 2022-01-04 23:47:08 +08:00
zdata.c Changes since last update: 2022-06-01 11:54:29 -07:00
zdata.h erofs: get rid of `struct z_erofs_collection' 2022-05-31 23:13:59 +08:00
zmap.c erofs: clean up z_erofs_extent_lookback 2022-03-17 00:08:48 +08:00
zpvec.h erofs: fix unsafe pagevec reuse of hooked pclusters 2021-11-08 10:02:10 +08:00