Skip to content

Commit

Permalink
fsdev_aio: link fixed
Browse files Browse the repository at this point in the history
Change-Id: I86cce6a58299c7d85ca921b20927502757eff419
  • Loading branch information
anton-nayshtut committed Jul 14, 2024
1 parent 51e0c7e commit 8d14311
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions module/fsdev/aio/fsdev_aio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1497,18 +1497,15 @@ lo_link(struct spdk_io_channel *ch, struct spdk_fsdev_io *fsdev_io)
return saverr;
}

res = file_object_fill_attr(fobject, &fsdev_io->u_out.link.attr);
if (res == -1) {
saverr = -errno;
SPDK_ERRLOG("file_object_fill_attr failed for " FOBJECT_FMT " (err=%d)\n",
FOBJECT_ARGS(fobject), saverr);
return saverr;
res = lo_do_lookup(vfsdev, new_parent_fobject, name, &fsdev_io->u_out.link.fobject,
&fsdev_io->u_out.link.attr);
if (res) {
SPDK_ERRLOG("lookup failed (err=%d)\n", res);
return res;
}

file_object_ref(fobject);

SPDK_DEBUGLOG(fsdev_aio, "LINK succeeded for " FOBJECT_FMT " -> " FOBJECT_FMT " name=%s\n",
FOBJECT_ARGS(fobject), FOBJECT_ARGS(new_parent_fobject), name);
FOBJECT_ARGS(fobject), FOBJECT_ARGS(fsdev_io->u_out.link.fobject), name);

return 0;
}
Expand Down

0 comments on commit 8d14311

Please sign in to comment.