]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
erofs: allow readdir() to be interrupted
authorChao Yu <chao@kernel.org>
Thu, 10 Jul 2025 07:36:18 +0000 (15:36 +0800)
committerGao Xiang <hsiangkao@linux.alibaba.com>
Thu, 10 Jul 2025 09:08:27 +0000 (17:08 +0800)
commitd31fbdc4c7252846ea80235db8c1a8c932da9d39
treef58caf37a103e75c366e8f651786e7ac2de4f91e
parent27917e8194f91dffd8b4825350c63cb68e98ce58
erofs: allow readdir() to be interrupted

In a quick slow device, readdir() may loop for long time in large
directory, let's give a chance to allow it to be interrupted by
userspace.

Signed-off-by: Chao Yu <chao@kernel.org>
Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Link: https://lore.kernel.org/r/20250710073619.4083422-1-chao@kernel.org
[ Gao Xiang: move cond_resched() to the end of the while loop. ]
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
fs/erofs/dir.c