anchao commented on code in PR #20858:
URL: https://github.com/apache/nuttx/pull/20858#discussion_r4336311697
##########
fs/rpmsgfs/rpmsgfs.c:
##########
@@ -241,18 +241,28 @@ static void rpmsgfs_mkpath(FAR struct rpmsgfs_mountpt_s
*fs,
strlcpy(path, fs->fs_root, pathlen);
strlcat(path, relpath, pathlen);
+ /* The remote root check can block and sleep while waiting for the remote
+ * endpoint to become ready. Do not hold the mount lock across that slow
+ * path; callers only need the lock for local state updates.
+ */
+
while (fs->timeout > 0)
{
struct stat buf;
int ret;
+ nxmutex_unlock(&fs->fs_lock);
Review Comment:
Maybe the better fix is to move rpmsgfs_mkpath() out of the fs_lock
protected region, instead of unlocking/relocking inside it?
--
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]