From: Trond Myklebust Date: Tue, 25 Sep 2007 19:55:03 +0000 (-0400) Subject: NLM: Fix a circular lock dependency in lockd X-Git-Tag: v2.6.23-rc9~32 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=255129d1e9ca0ed3d69d5517fae3e03d7ab4b806;p=pandora-kernel.git NLM: Fix a circular lock dependency in lockd The problem is that the garbage collector for the 'host' structures nlm_gc_hosts(), holds nlm_host_mutex while calling down to nlmsvc_mark_resources, which, eventually takes the file->f_mutex. We cannot therefore call nlmsvc_lookup_host() from within nlmsvc_create_block, since the caller will already hold file->f_mutex, so the attempt to grab nlm_host_mutex may deadlock. Fix the problem by calling nlmsvc_lookup_host() outside the file->f_mutex. Signed-off-by: Trond Myklebust Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed