From: Gao Xiang <xiang@kernel.org>
To: Jingbo Xu <jefflexu@linux.alibaba.com>
Cc: hsiangkao@linux.alibaba.com, linux-erofs@lists.ozlabs.org,
huyue2@coolpad.com
Subject: Re: [PATCH v2] erofs-utils: lib: fix erofs_iterate_dir() recursion
Date: Sat, 22 Jul 2023 14:20:25 +0800 [thread overview]
Message-ID: <ZLt1KZTLCKyujlmS@debian> (raw)
In-Reply-To: <20230722054009.124119-1-jefflexu@linux.alibaba.com>
Hi Jingbo,
On Sat, Jul 22, 2023 at 01:40:09PM +0800, Jingbo Xu wrote:
> ctx->dir may have changed when ctx is reused along erofs_iterate_dir()
> recursion.
>
> Signed-off-by: Jingbo Xu <jefflexu@linux.alibaba.com>
> ---
> changes since last version:
> since traverse_dirents() can be called multiple times in one single
> erofs_iterate_dir() call, ctx->dir may have changed at the entry of
> traverse_dirents(). The previous v1 shall be deprecated.
>
> v1: https://lore.kernel.org/all/20230718052101.124039-3-jefflexu@linux.alibaba.com/
I plan to drop this commit directly. `struct erofs_dir_context` is not
designed for reusing recursively. It's not the case just due to
`ctx->dir` but also internal states.
You need to build another ctx for recursion.
Thanks,
Gao Xiang
next prev parent reply other threads:[~2023-07-22 6:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-22 5:40 [PATCH v2] erofs-utils: lib: fix erofs_iterate_dir() recursion Jingbo Xu
2023-07-22 6:20 ` Gao Xiang [this message]
2023-07-22 7:04 ` Jingbo Xu
2023-07-22 7:49 ` Gao Xiang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZLt1KZTLCKyujlmS@debian \
--to=xiang@kernel.org \
--cc=hsiangkao@linux.alibaba.com \
--cc=huyue2@coolpad.com \
--cc=jefflexu@linux.alibaba.com \
--cc=linux-erofs@lists.ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox