func: static void v9fs_unlinkat(void *opaque) V9fsString name ; int32_t dfid , flags ; size_t offset = 7 ; V9fsFidState * dfidp ; V9fsPDU * pdu = opaque ; err = pdu_unmarshal ( pdu , offset , "dsd" , & dfid , & name , & flags ); if ( err < 0 )  dfidp = get_fid ( pdu , dfid ); 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 ); if ( err < 0 )  return NULL ; f -> flags |= FID_REFERENCED; return f ; return NULL ; if ( dfidp == NULL )  err = - EINVAL; err = v9fs_co_name_to_path ( pdu , & dfidp -> path , name . data , & path ); if ( err < 0 )  err = v9fs_mark_fids_unreclaim ( pdu , & path ); static int v9fs_mark_fids_unreclaim(V9fsPDU *pdu, V9fsPath *path) int err ; V9fsState * s = pdu -> s ; V9fsFidState * fidp , head_fid ; head_fid . next = s -> fid_list; for (fidp = s->fid_list; fidp; fidp = fidp->next) if ( fidp -> path . size != path -> size )  if ( ! memcmp ( fidp -> path . data , path -> data , path -> size ) )  fidp -> flags |= FID_NON_RECLAIMABLE; err = v9fs_reopen_fid ( pdu , fidp ); 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 - 1 ; if ( err == 0 )  fidp = & head_fid; return 0 ; if ( err < 0 )  err = v9fs_co_unlinkat ( pdu , & dfidp -> path , & name , flags ); if ( ! err )  err = offset; complete_pdu ( pdu -> s , pdu , err ); static void complete_pdu(V9fsState *s, V9fsPDU *pdu, ssize_t len) if ( len < 0 )  int err = - len ; if ( s -> proto_version != V9FS_PROTO_2000L )  V9fsString str ; str . data = strerror ( err ); str . size = strlen ( str . data ); len += pdu_marshal ( pdu , len , "s" , & str ); len += pdu_marshal ( pdu , len , "d" , err ); pdu_marshal ( pdu , 0 , "dbw" , ( int32_t ) len , id , pdu -> tag ); pdu -> size = len; pdu -> id = id; virtqueue_push ( s -> vq , & pdu -> elem , len ); qemu_co_queue_next ( & pdu -> complete ); free_pdu ( s , pdu ); 