static void v9fs_link(void *opaque)
{
    V9fsPDU *pdu = opaque;
    int32_t dfid, oldfid;
    V9fsFidState *dfidp, *oldfidp;
    V9fsString name;
    size_t offset = 7;
    int err = 0;
    v9fs_string_init(&name);
    err = pdu_unmarshal(pdu, offset, "dds", &dfid, &oldfid, &name);
    if (err < 0) {
    trace_v9fs_link(pdu->tag, pdu->id, dfid, oldfid, name.data);
    if (name_is_illegal(name.data)) {
        err = -ENOENT;
    dfidp = get_fid(pdu, dfid);
    if (dfidp == NULL) {
        err = -ENOENT;
    oldfidp = get_fid(pdu, oldfid);
    if (oldfidp == NULL) {
        err = -ENOENT;
        goto out;
    err = v9fs_co_link(pdu, oldfidp, dfidp, &name);
    if (!err) {
        err = offset;
out:
    put_fid(pdu, dfidp);
out_nofid:
    v9fs_string_free(&name);
    pdu_complete(pdu, err);
static void v9fs_link(void *opaque)
{
    V9fsPDU *pdu = opaque;
    int32_t dfid, oldfid;
    V9fsFidState *dfidp, *oldfidp;
    V9fsString name;
    size_t offset = 7;
    int err = 0;
    v9fs_string_init(&name);
    err = pdu_unmarshal(pdu, offset, "dds", &dfid, &oldfid, &name);
    if (err < 0) {
    trace_v9fs_link(pdu->tag, pdu->id, dfid, oldfid, name.data);
    if (name_is_illegal(name.data)) {
        err = -ENOENT;
    dfidp = get_fid(pdu, dfid);
    if (dfidp == NULL) {
        err = -ENOENT;
    oldfidp = get_fid(pdu, oldfid);
    if (oldfidp == NULL) {
        err = -ENOENT;
        goto out;
    err = v9fs_co_link(pdu, oldfidp, dfidp, &name);
    if (!err) {
        err = offset;
out:
    put_fid(pdu, dfidp);
out_nofid:
    v9fs_string_free(&name);
    pdu_complete(pdu, err);
static void FUNC_0(void *VAR_0)
{
    V9fsPDU *pdu = VAR_0;
    int32_t dfid, oldfid;
    V9fsFidState *dfidp, *oldfidp;
    V9fsString name;
    size_t offset = 7;
    int VAR_1 = 0;
    v9fs_string_init(&name);
    VAR_1 = pdu_unmarshal(pdu, offset, "dds", &dfid, &oldfid, &name);
    if (VAR_1 < 0) {
    trace_v9fs_link(pdu->tag, pdu->id, dfid, oldfid, name.data);
    if (name_is_illegal(name.data)) {
        VAR_1 = -ENOENT;
    dfidp = get_fid(pdu, dfid);
    if (dfidp == NULL) {
        VAR_1 = -ENOENT;
    oldfidp = get_fid(pdu, oldfid);
    if (oldfidp == NULL) {
        VAR_1 = -ENOENT;
        goto out;
    VAR_1 = v9fs_co_link(pdu, oldfidp, dfidp, &name);
    if (!VAR_1) {
        VAR_1 = offset;
out:
    put_fid(pdu, dfidp);
out_nofid:
    v9fs_string_free(&name);
    pdu_complete(pdu, VAR_1);
static void FUNC_0(void *VAR_0)
{ V9fsPDU *pdu = VAR_0; int32_t dfid, oldfid; V9fsFidState *dfidp, *oldfidp; V9fsString name; size_t offset = 7; int VAR_1 = 0; v9fs_string_init(&name); VAR_1 = pdu_unmarshal(pdu, offset, "dds", &dfid, &oldfid, &name); if (VAR_1 < 0) { trace_v9fs_link(pdu->tag, pdu->id, dfid, oldfid, name.data); if (name_is_illegal(name.data)) { VAR_1 = -ENOENT; dfidp = get_fid(pdu, dfid); if (dfidp == NULL) { VAR_1 = -ENOENT; oldfidp = get_fid(pdu, oldfid); if (oldfidp == NULL) { VAR_1 = -ENOENT; goto out; VAR_1 = v9fs_co_link(pdu, oldfidp, dfidp, &name); if (!VAR_1) { VAR_1 = offset; out:
put_fid(pdu, dfidp); out_nofid:
v9fs_string_free(&name); pdu_complete(pdu, VAR_1);