func: static void v9fs_walk(void *opaque) int name_idx ; V9fsPath dpath , path ; uint16_t nwnames ; size_t offset = 7 ; int32_t fid , newfid ; V9fsString * wnames = NULL ; V9fsFidState * fidp ; V9fsPDU * pdu = opaque ; err = pdu_unmarshal ( pdu , offset , "ddw" , & fid , & newfid , & nwnames ); if ( err < 0 )  offset += err; if ( nwnames && nwnames <= P9_MAXWELEM )  wnames = g_malloc0 ( sizeof ( wnames [ 0 ] ) * nwnames ); for (i = 0; i < nwnames; i++) err = pdu_unmarshal ( pdu , offset , "s" , & wnames [ i ] ); if ( err < 0 )  offset += err; if ( nwnames > P9_MAXWELEM )  fidp = get_fid ( pdu , fid ); static V9fsFidState *get_fid(V9fsPDU *pdu, int32_t fid) int err ; V9fsFidState * f ; V9fsState * s = pdu -> s ; for (f = s->fid_list; f; f = f->next) if ( f -> fid == fid )  f -> ref ++; err = v9fs_reopen_fid ( pdu , f ); static int v9fs_reopen_fid(V9fsPDU *pdu, V9fsFidState *f) int err = 1 ; if ( f -> fid_type == P9_FID_FILE )  if ( f -> fs . fd == - 1 )  err = v9fs_co_open ( pdu , f , f -> open_flags ); while ( err == - EINTR && ! pdu -> cancelled )  if ( f -> fid_type == P9_FID_DIR )  if ( f -> fs . dir == NULL )  err = v9fs_co_opendir ( pdu , f ); while ( err == - EINTR && ! pdu -> cancelled )  return err ; if ( err < 0 )  return NULL ; return f ; return NULL ; if ( fidp == NULL )  for (name_idx = 0; name_idx < nwnames; name_idx++) err = v9fs_co_name_to_path ( pdu , & dpath , wnames [ name_idx ] . data , & path ); if ( err < 0 )  err = v9fs_co_lstat ( pdu , & path , & stbuf ); if ( err < 0 )  if ( fid == newfid )  v9fs_path_copy ( & fidp -> path , & path ); void v9fs_path_copy(V9fsPath *lhs, V9fsPath *rhs) lhs -> data = g_malloc ( rhs -> size ); memcpy ( lhs -> data , rhs -> data , rhs -> size ); lhs -> size = rhs -> size; 