fixed a deadlock

This commit is contained in:
2026-04-07 09:56:47 +02:00
parent a89ddb8e39
commit 5d7725d77b
2 changed files with 6 additions and 35 deletions

View File

@@ -1569,16 +1569,7 @@ static nn_Exit ncl_tmpfsHandler(nn_FSRequest *req) {
}
if(req->action == NN_FS_MKDIR) {
nn_lock(ctx, tmpfs->lock);
if(ncl_tmpSpaceFree(tmpfs) < tmpfs->fileCost) {
nn_unlock(ctx, tmpfs->lock);
nn_setError(C, "out of space");
return NN_EBADCALL;
}
if(!ncl_tmpMkdir(tmpfs->root, req->mkdir)) {
nn_unlock(ctx, tmpfs->lock);
nn_setError(C, "operation failed");
return NN_EBADCALL;
}
ncl_tmpMkdir(tmpfs->root, req->mkdir);
nn_unlock(ctx, tmpfs->lock);
return NN_OK;
}