From patchwork Fri Mar 1 00:24:58 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Trond Myklebust X-Patchwork-Id: 2199771 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 1B73CDF2A2 for ; Fri, 1 Mar 2013 00:25:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751308Ab3CAAZF (ORCPT ); Thu, 28 Feb 2013 19:25:05 -0500 Received: from mx12.netapp.com ([216.240.18.77]:49591 "EHLO mx12.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750985Ab3CAAZE (ORCPT ); Thu, 28 Feb 2013 19:25:04 -0500 X-IronPort-AV: E=Sophos;i="4.84,758,1355126400"; d="scan'208";a="26862262" Received: from smtp1.corp.netapp.com ([10.57.156.124]) by mx12-out.netapp.com with ESMTP; 28 Feb 2013 16:25:04 -0800 Received: from leira.trondhjem.org.com (leira.trondhjem.org.vpn.netapp.com [10.55.71.4]) by smtp1.corp.netapp.com (8.13.1/8.13.1/NTAP-1.6) with ESMTP id r210P1dd017162; Thu, 28 Feb 2013 16:25:02 -0800 (PST) From: Trond Myklebust To: linux-nfs@vger.kernel.org, andros@netapp.com Subject: [PATCH] NFSv4: Fix another open/open_recovery deadlock Date: Thu, 28 Feb 2013 16:24:58 -0800 Message-Id: <1362097498-32641-1-git-send-email-Trond.Myklebust@netapp.com> X-Mailer: git-send-email 1.8.1.2 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org If we don't release the open seqid before we wait for state recovery, then we may end up deadlocking the state recovery thread. This patch addresses a new deadlock that was introduced by commit c21443c2c792cd9b463646d982b0fe48aa6feb0f (NFSv4: Fix a reboot recovery race when opening a file) Reported-by: Andy Adamson Signed-off-by: Trond Myklebust --- fs/nfs/nfs4proc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 655237f..37eb385 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -1158,6 +1158,7 @@ _nfs4_opendata_to_nfs4_state(struct nfs4_opendata *data) data->o_arg.fmode); iput(inode); out: + nfs_release_seqid(data->o_arg.seqid); return state; err_put_inode: iput(inode);