+- add patches.fixes/linux-post-2.6.3-20040220
[linux-flexiantxendom0-3.2.10.git] / net / sunrpc / svcauth.c
index 45fff1f..db78e72 100644 (file)
@@ -150,7 +150,13 @@ DefineCacheLookup(struct auth_domain,
                  &auth_domain_cache,
                  auth_domain_hash(item),
                  auth_domain_match(tmp, item),
-                 kfree(new); if(!set) return NULL;
+                 kfree(new); if(!set) {
+                       if (new)
+                               write_unlock(&auth_domain_cache.hash_lock);
+                       else
+                               read_unlock(&auth_domain_cache.hash_lock);
+                       return NULL;
+                 }
                  new=item; atomic_inc(&new->h.refcnt),
                  /* no update */,
                  0 /* no inplace updates */