Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933897AbbFPJZu (ORCPT ); Tue, 16 Jun 2015 05:25:50 -0400 Received: from mail.kernel.org ([198.145.29.136]:55180 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932190AbbFPInc (ORCPT ); Tue, 16 Jun 2015 04:43:32 -0400 From: lizf@kernel.org To: stable@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Trond Myklebust , Zefan Li Subject: [PATCH 3.4 061/172] NFSv4: Don't call put_rpccred() under the rcu_read_lock() Date: Tue, 16 Jun 2015 16:35:15 +0800 Message-Id: <1434443826-4929-61-git-send-email-lizf@kernel.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1434443587-4599-1-git-send-email-lizf@kernel.org> References: <1434443587-4599-1-git-send-email-lizf@kernel.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1348 Lines: 41 From: Trond Myklebust 3.4.108-rc1 review patch. If anyone has any objections, please let me know. ------------------ commit 7c0af9ffb7bb4e5355470fa60b3eb711ddf226fa upstream. put_rpccred() can sleep. Fixes: 8f649c3762547 ("NFSv4: Fix the locking in nfs_inode_reclaim_delegation()") Signed-off-by: Trond Myklebust [lizf: Backported to 3.4: adjust context] Signed-off-by: Zefan Li --- fs/nfs/delegation.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c index 16d16e5..62261de 100644 --- a/fs/nfs/delegation.c +++ b/fs/nfs/delegation.c @@ -148,8 +148,8 @@ void nfs_inode_reclaim_delegation(struct inode *inode, struct rpc_cred *cred, &delegation->flags); NFS_I(inode)->delegation_state = delegation->type; spin_unlock(&delegation->lock); - put_rpccred(oldcred); rcu_read_unlock(); + put_rpccred(oldcred); } else { /* We appear to have raced with a delegation return. */ spin_unlock(&delegation->lock); -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/