anchao opened a new pull request, #20858:
URL: https://github.com/apache/nuttx/pull/20858
## Summary
Fix two rpmsgfs error/wait path issues.
First, `rpmsgfs_mkpath()` waits for the remote root to become available
before continuing. That wait may issue remote stat requests and sleep
between retries. The previous code kept the mount lock held across this
slow path, which could unnecessarily block other local rpmsgfs operations
while waiting for the remote endpoint.
This change releases the mount lock while performing the remote root
stat and while sleeping between retries, then reacquires it before
accessing local mount state again.
Second, `rpmsgfs_open()` opens the remote file before seeking to the end
for `O_APPEND` mode. If the append seek failed, the previous error path
freed the local open-file structure without closing the already-opened
remote file descriptor.
This change routes that failure through a cleanup path that closes the
remote fd before freeing the local structure.
## Impact
- Avoids holding the rpmsgfs mount lock across remote stat/sleep waits.
- Prevents leaking a remote file descriptor when `O_APPEND` seek setup
fails.
- Keeps successful open behavior unchanged.
- Only affects remote-root wait and append-open error paths.
## Testing
sim/rpproxy, sim/rpserver
--
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]