OSDN Git Service

erofs: clean up z_erofs_extent_lookback
authorGao Xiang <hsiangkao@linux.alibaba.com>
Thu, 10 Mar 2022 18:27:42 +0000 (02:27 +0800)
committerGao Xiang <hsiangkao@linux.alibaba.com>
Wed, 16 Mar 2022 16:08:48 +0000 (00:08 +0800)
commitab474fccd04509db89fde8d3b28c39aa9a47db64
treef79c58458b64ed05bbb623ea10132efb399782d2
parentd467e980d0239fd95cc93b0995199973624a4825
erofs: clean up z_erofs_extent_lookback

Avoid the unnecessary tail recursion since it can be converted into
a loop directly in order to prevent potential stack overflow.

It's a pretty straightforward conversion.

Link: https://lore.kernel.org/r/20220310182743.102365-1-hsiangkao@linux.alibaba.com
Reviewed-by: Yue Hu <huyue2@coolpad.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
fs/erofs/zmap.c