v9fs/client.c:add check response.nwqid == nwname

Summary:
  There are differences in different server implementations, so it is necessary to check whether the returned nwqid satisfies the requested number.

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
This commit is contained in:
chenrun1 2024-10-10 16:13:08 +08:00 committed by Xiang Xiao
parent 2ac2d5d511
commit 1f540a93d2

View file

@ -1589,6 +1589,16 @@ int v9fs_client_walk(FAR struct v9fs_client_s *client, FAR const char *path,
newfid = ret;
}
/* There are differences in different server implementations, so it is
* necessary to check whether the returned nwqid satisfies the requested
* number.
*/
if (response.nwqid != nwname)
{
newfid = -ENOENT;
}
err:
lib_put_pathbuffer(request_payload);
lib_put_pathbuffer(response_payload);