Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Work around a bug in lfs_remove() #2798

Merged
merged 2 commits into from
Jul 15, 2024
Merged

Work around a bug in lfs_remove() #2798

merged 2 commits into from
Jul 15, 2024

Conversation

sergeuz
Copy link
Member

@sergeuz sergeuz commented Jul 11, 2024

Problem

The rmrf() utility function may fail with FILESYSTEM_NOENT due to a bug in LittleFS, which manifests itself when a filesystem entry is deleted while there's an open handle for one or more of its parent directories.

Solution

Do not call lfs_remove() while iterating over the directory entries in rmrf().

Steps to Test

Run integration tests.

@sergeuz sergeuz requested a review from avtolstoy July 11, 2024 16:16
@sergeuz sergeuz added the bug label Jul 11, 2024
@avtolstoy avtolstoy merged commit ce64c47 into develop Jul 15, 2024
13 checks passed
@avtolstoy avtolstoy deleted the fix/rmrf-noent branch July 15, 2024 13:17
@Kategrode Kategrode added this to the 5.9.0 milestone Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants