diff --git a/src/fuse/FuseOps.cc b/src/fuse/FuseOps.cc index 6ff77883..1f55db77 100644 --- a/src/fuse/FuseOps.cc +++ b/src/fuse/FuseOps.cc @@ -1234,7 +1234,13 @@ void hf3fs_symlink(fuse_req_t req, const char *link, fuse_ino_t fparent, const c ior->ioDepth, *ior->iora); if (!res2) { - handle_error(req, res); + handle_error(req, res2); + // rollback the successful addIov before returning + auto rmRes = d.iovs.rmIov(name, userInfo); + if (rmRes.hasError()) { + XLOGF(ERR, "failed to rollback iov after addIoRing failure: {}", rmRes.error()); + } + return; } // record the ior index for later removal res->second->iorIndex = *res2;