anchao opened a new pull request, #20862:
URL: https://github.com/apache/nuttx/pull/20862
## Summary
Fix the `MTDIOC_BULKERASE` error check in the rwbuffer MTD wrapper.
`mtd_ioctl()` forwards `MTDIOC_BULKERASE` to the wrapped MTD device and
then invalidates the rwbuffer cache. The previous code checked the result
with `ret >= 0`, which treated a successful erase as an error and skipped
cache invalidation.
This change checks for `ret < 0` instead, so the cache is invalidated
after a successful bulk erase.
## Impact
- Restores cache invalidation after successful `MTDIOC_BULKERASE`.
- Prevents stale rwbuffer cache contents after erasing the underlying
device.
- Keeps the actual device erase call unchanged.
- Only affects the rwbuffer wrapper bulk erase ioctl path.
## Testing
sim/mtdrwb
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]