--- ./fs/locks.c.orig	Sat Dec 13 15:16:53 2003
+++ ./fs/locks.c	Sat Dec 13 15:17:07 2003
@@ -137,6 +137,7 @@
 /* Allocate an empty lock structure. */
 static struct file_lock *locks_alloc_lock(void)
 {
+	gr_learn_resource(current, RLIMIT_LOCKS, current->locks, 0);
 	return kmem_cache_alloc(filelock_cache, SLAB_KERNEL);
 }