From patchwork Wed Jan 5 20:51:24 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Adamson X-Patchwork-Id: 454971 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 p05Kps3w001282 for ; Wed, 5 Jan 2011 20:51:59 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753004Ab1AEUv4 (ORCPT ); Wed, 5 Jan 2011 15:51:56 -0500 Received: from mx2.netapp.com ([216.240.18.37]:12006 "EHLO mx2.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753020Ab1AEUvy (ORCPT ); Wed, 5 Jan 2011 15:51:54 -0500 X-IronPort-AV: E=Sophos;i="4.60,279,1291622400"; d="scan'208";a="502095651" Received: from smtp1.corp.netapp.com ([10.57.156.124]) by mx2-out.netapp.com with ESMTP; 05 Jan 2011 12:51:42 -0800 Received: from localhost.localdomain (isabel3-lxp.hq.netapp.com [10.58.58.218] (may be forged)) by smtp1.corp.netapp.com (8.13.1/8.13.1/NTAP-1.6) with ESMTP id p05KpZtJ013531; Wed, 5 Jan 2011 12:51:41 -0800 (PST) From: andros@netapp.com To: trond.myklebust@netapp.com Cc: bfields@redhat.com, linux-nfs@vger.kernel.org, Andy Adamson Subject: [PATCH_V8 06/13] NFS do not clear minor version at nfs_client free Date: Wed, 5 Jan 2011 15:51:24 -0500 Message-Id: <1294260690-3095-7-git-send-email-andros@netapp.com> X-Mailer: git-send-email 1.6.6 In-Reply-To: <1294260690-3095-6-git-send-email-andros@netapp.com> References: <1294260690-3095-1-git-send-email-andros@netapp.com> <1294260690-3095-2-git-send-email-andros@netapp.com> <1294260690-3095-3-git-send-email-andros@netapp.com> <1294260690-3095-4-git-send-email-andros@netapp.com> <1294260690-3095-5-git-send-email-andros@netapp.com> <1294260690-3095-6-git-send-email-andros@netapp.com> 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.3 (demeter1.kernel.org [140.211.167.41]); Wed, 05 Jan 2011 20:51:59 +0000 (UTC) diff --git a/fs/nfs/client.c b/fs/nfs/client.c index 0870d0d..855add6 100644 --- a/fs/nfs/client.c +++ b/fs/nfs/client.c @@ -170,21 +170,17 @@ error_0: } #ifdef CONFIG_NFS_V4 -/* - * Clears/puts all minor version specific parts from an nfs_client struct - * reverting it to minorversion 0. - */ -static void nfs4_clear_client_minor_version(struct nfs_client *clp) -{ #ifdef CONFIG_NFS_V4_1 - if (nfs4_has_session(clp)) { +static void nfs4_shutdown_session(struct nfs_client *clp) +{ + if (nfs4_has_session(clp)) nfs4_destroy_session(clp->cl_session); - clp->cl_session = NULL; - } - - clp->cl_mvops = nfs_v4_minor_ops[0]; -#endif /* CONFIG_NFS_V4_1 */ } +#else /* CONFIG_NFS_V4_1 */ +static void nfs4_shutdown_session(struct nfs_client *clp) +{ +} +#endif /* CONFIG_NFS_V4_1 */ /* * Destroy the NFS4 callback service @@ -199,7 +195,7 @@ static void nfs4_shutdown_client(struct nfs_client *clp) { if (__test_and_clear_bit(NFS_CS_RENEWD, &clp->cl_res_state)) nfs4_kill_renewd(clp); - nfs4_clear_client_minor_version(clp); + nfs4_shutdown_session(clp); nfs4_destroy_callback(clp); if (__test_and_clear_bit(NFS_CS_IDMAP, &clp->cl_res_state)) nfs_idmap_delete(clp);