5. The method of claim 1 , further comprising: restricting access to the data structure in response to locking the data structure.
1. A computer-implemented method for acquiring a lock of a data structure in a network file system (“NFS”) environment with a processor, the method comprising: creating a text file in a management library of the data structure, wherein a name of the text file comprises an identifier of the lock, an identifier of a process attempting to acquire the lock, and an identifier of a machine on which the process attempting to acquire the lock is running; storing the identifier of the process attempting to acquire the lock in the contents of the text file; storing the identifier of the machine on which the process attempting to acquire the lock is running in the contents of the text file; creating a hard link that points to the text file; determining a number of links pointing to the text file; locking the data structure based on the number of links pointing to the text file; reading the contents of the text file; determining whether the contents of the text file comprise the identifier of the process that acquired the lock; determining whether the contents of the text file comprise the identifier of the machine on which the process that acquired the lock is running; and determining whether to release the lock of the data structure based on whether the contents of the text file comprise the identifier of the process that acquired the lock and the identifier of the machine on which the process that acquired the lock is running, wherein determining whether to release the lock of the data structure based on whether the contents of the text file comprise the identifier of the process that acquired the lock and the identifier of the machine on which the process that acquired the lock is running comprises: releasing the lock of the data structure in response to determining the contents of the text file comprises both the identifier of the process that acquired the lock and the identifier of the machine on which the process that acquired the lock is running, and maintaining the lock of the data structure in response to determining the contents of the text file does not comprise at least one of the identifier of the process that acquired the lock or the identifier of the machine on which the process that acquired the lock is running.