From patchwork Wed Sep 26 17:12:59 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan Schumaker X-Patchwork-Id: 1510241 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 626C4E00F5 for ; Wed, 26 Sep 2012 17:13:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752288Ab2IZRNK (ORCPT ); Wed, 26 Sep 2012 13:13:10 -0400 Received: from mx2.netapp.com ([216.240.18.37]:16446 "EHLO mx2.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756567Ab2IZRNJ (ORCPT ); Wed, 26 Sep 2012 13:13:09 -0400 X-IronPort-AV: E=Sophos;i="4.80,491,1344236400"; d="scan'208";a="694411918" Received: from smtp1.corp.netapp.com ([10.57.156.124]) by mx2-out.netapp.com with ESMTP; 26 Sep 2012 10:13:02 -0700 Received: from davros.hq.netapp.com (vpn2ntap-112199.hq.netapp.com [10.63.224.179] (may be forged)) by smtp1.corp.netapp.com (8.13.1/8.13.1/NTAP-1.6) with ESMTP id q8QHD0MU000909; Wed, 26 Sep 2012 10:13:02 -0700 (PDT) From: bjschuma@netapp.com To: Trond.Myklebust@netapp.com Cc: linux-nfs@vger.kernel.org Subject: [PATCH 2/2] NFS: Always use the open stateid when checking for expired opens Date: Wed, 26 Sep 2012 13:12:59 -0400 Message-Id: <1348679579-7888-2-git-send-email-bjschuma@netapp.com> X-Mailer: git-send-email 1.7.12.1 In-Reply-To: <1348679579-7888-1-git-send-email-bjschuma@netapp.com> References: <1348679579-7888-1-git-send-email-bjschuma@netapp.com> Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org From: Bryan Schumaker If we are reading through a delegation, and the delegation is OK then state->stateid will still point to a delegation stateid and not an open stateid. Signed-off-by: Bryan Schumaker --- fs/nfs/nfs4proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index e47ec55..df7e1a3 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -1792,7 +1792,7 @@ static void nfs41_clear_delegation_stateid(struct nfs4_state *state) static int nfs41_check_open_stateid(struct nfs4_state *state) { struct nfs_server *server = NFS_SERVER(state->inode); - nfs4_stateid *stateid = &state->stateid; + nfs4_stateid *stateid = &state->open_stateid; int status; /* If a state reset has been done, test_stateid is unneeded */