A method, system, application programming interface, computer system, and computer program product to provide locks for controlling access to data by nodes in a multi-node environment while minimizing messages sent between nodes. Based upon knowledge of lock usage in the multi-node environment, a multi-node knowledge agent can determine when no other node is accessing data protected by a given lock, as well as when an event has occurred that precedes a request by another node to access data protected by the given lock. When no other node is accessing data and no such event has occurred, the multi-node knowledge agent can designate that given lock as “masterless.” A lock agent on the node hosting the multi-node knowledge agent is authorized to subsequently grant access to the data protected by the masterless lock to clients on that node without communicating with a lock master, which may reside at another node.