/* Note that we can't do proper reference counting without major contortions because the code in fs/locks.c creates, deletes and splits locks without notification. Our only way is to walk the entire lock list each time we remove a lock.  */
void nlm_release_file(struct nlm_file *file)
/* Note that we can't do proper reference counting without major contortions because the code in fs/locks.c creates, deletes and splits locks without notification. Our only way is to walk the entire lock list each time we remove a lock.  */
void nlm_release_file(struct nlm_file *file)
{
	dprintk("lockd: nlm_release_file(%p, ct = %d)\n",
				file, file->f_count);
	mutex_lock(&nlm_file_mutex);
	if (--file->f_count == 0 && !nlm_file_inuse(file))
		nlm_delete_file(file);
	mutex_unlock(&nlm_file_mutex);
}