Re: [PATCH v3] erofs: simplify the code using for_each_set_bit

From: Gao Xiang
Date: Thu Dec 18 2025 - 04:22:10 EST




On 2025/12/18 12:19, Yuwen Chen wrote:
When mounting the EROFS file system, it is necessary to check the
available compression algorithms. At this time, the for_each_set_bit
function can be used to simplify the code logic.

Signed-off-by: Yuwen Chen <ywen.chen@xxxxxxxxxxx>
---

v2 -> v3:
- rebase the patch
- remove the unnecessary judgment logic

v1 -> v2:
- revert the modifications to the fs/erofs/internal.h

fs/erofs/decompressor.c | 21 +++++++++------------
1 file changed, 9 insertions(+), 12 deletions(-)

LGTM,
Reviewed-by: Gao Xiang <hsiangkao@xxxxxxxxxxxxxxxxx>

Thanks,
Gao Xiang