From patchwork Mon Jan 24 20:50:26 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuck Lever X-Patchwork-Id: 502931 X-Patchwork-Delegate: Trond.Myklebust@netapp.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p0OKp3YO000401 for ; Mon, 24 Jan 2011 20:51:04 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752520Ab1AXUvB (ORCPT ); Mon, 24 Jan 2011 15:51:01 -0500 Received: from mail-qy0-f181.google.com ([209.85.216.181]:41014 "EHLO mail-qy0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752486Ab1AXUvA (ORCPT ); Mon, 24 Jan 2011 15:51:00 -0500 Received: by qyk12 with SMTP id 12so5009942qyk.19 for ; Mon, 24 Jan 2011 12:50:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:from:subject:to:cc:date:message-id :user-agent:mime-version:content-type:content-transfer-encoding; bh=eL02aMMx69SWkh0XAEN8YVJYPfZOcq+IXtcxszH9r/g=; b=k0VIII6AXfAZVu/SnrcllDexJwFWmr02Inp9WJUXCT4W/0k9DqkYaQEcq5O6/FDHsT dTwwkCqkzZqOD6+OSef+yVodZA/A2IFJHq2kcRwpXjL97Fa/pIva1ZXHjf7AgeARwxWv dmwq/BzaKFtaRJDmkw+y9OSE+aoQ7h6s1F9XU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:subject:to:cc:date:message-id:user-agent:mime-version :content-type:content-transfer-encoding; b=q9gicrJ313hHk0c58z7GkFqAE73asTOBbc35Y4oSH2TfjpPnYpPubMUDReYwuEebr9 32Xo7eUSCzGuGiisZfEXRcDhsOYfvC+jDpV/Jtg//sfWOraGBhiMorbcAyp4X+N5ghLq Yi1NfMh+q6c3/7X/VtPviyEjl+0dHyVhUWSFI= Received: by 10.229.38.140 with SMTP id b12mr4189061qce.161.1295902229716; Mon, 24 Jan 2011 12:50:29 -0800 (PST) Received: from matisse.1015granger.net (adsl-99-26-161-222.dsl.sfldmi.sbcglobal.net [99.26.161.222]) by mx.google.com with ESMTPS id w12sm8547048qco.44.2011.01.24.12.50.27 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 24 Jan 2011 12:50:28 -0800 (PST) From: Chuck Lever Subject: [PATCH] NLM: Fix "kernel BUG at fs/lockd/host.c:417!" or ".../host.c:283!" To: nbowler@elliptictech.com, trond.myklebust@netapp.com Cc: bfields@fieldses.org, linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org Date: Mon, 24 Jan 2011 15:50:26 -0500 Message-ID: <20110124204332.1878.35846.stgit@matisse.1015granger.net> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Mon, 24 Jan 2011 20:51:04 +0000 (UTC) diff --git a/fs/lockd/host.c b/fs/lockd/host.c index 5f1bcb2..b7c99bf 100644 --- a/fs/lockd/host.c +++ b/fs/lockd/host.c @@ -520,7 +520,7 @@ static struct nlm_host *next_host_state(struct hlist_head *cache, struct nsm_handle *nsm, const struct nlm_reboot *info) { - struct nlm_host *host = NULL; + struct nlm_host *host; struct hlist_head *chain; struct hlist_node *pos; @@ -532,12 +532,13 @@ static struct nlm_host *next_host_state(struct hlist_head *cache, host->h_state++; nlm_get_host(host); - goto out; + mutex_unlock(&nlm_host_mutex); + return host; } } -out: + mutex_unlock(&nlm_host_mutex); - return host; + return NULL; } /**