Return-Path: linux-nfs-owner@vger.kernel.org Received: from co1ehsobe004.messaging.microsoft.com ([216.32.180.187]:54189 "EHLO co1outboundpool.messaging.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754464Ab2HPXut (ORCPT ); Thu, 16 Aug 2012 19:50:49 -0400 From: Shai Lazmi To: "Myklebust, Trond" CC: William Dauchy , "Schumaker, Bryan" , "linux-nfs@vger.kernel.org" Date: Thu, 16 Aug 2012 16:50:43 -0700 Subject: RE: [PATCH 1/2] NFS: Clear key construction data if the idmap upcall fails Message-ID: <21641D3714F5AF449DC483E699E1124E86E6409585@AVEXMB2.qlogic.org> References: <1345148622-10845-1-git-send-email-Trond.Myklebust@netapp.com> <21641D3714F5AF449DC483E699E1124E86E640957F@AVEXMB2.qlogic.org> <4FA345DA4F4AE44899BD2B03EEEC2FA93B542B@SACEXCMBX04-PRD.hq.netapp.com> In-Reply-To: <4FA345DA4F4AE44899BD2B03EEEC2FA93B542B@SACEXCMBX04-PRD.hq.netapp.com> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Sender: linux-nfs-owner@vger.kernel.org List-ID: TVMgb3V0bG9vaw0KQmVzdCB0aGluZyBpcyB0byBhdHRhY2hlZCB0aGUgcGF0Y2gNCg0KLS0tLS1P cmlnaW5hbCBNZXNzYWdlLS0tLS0NCkZyb206IE15a2xlYnVzdCwgVHJvbmQgW21haWx0bzpUcm9u ZC5NeWtsZWJ1c3RAbmV0YXBwLmNvbV0NClNlbnQ6IFRodXJzZGF5LCBBdWd1c3QgMTYsIDIwMTIg NDo1MCBQTQ0KVG86IFNoYWkgTGF6bWkNCkNjOiBXaWxsaWFtIERhdWNoeTsgU2NodW1ha2VyLCBC cnlhbjsgbGludXgtbmZzQHZnZXIua2VybmVsLm9yZw0KU3ViamVjdDogUmU6IFtQQVRDSCAxLzJd IE5GUzogQ2xlYXIga2V5IGNvbnN0cnVjdGlvbiBkYXRhIGlmIHRoZSBpZG1hcCB1cGNhb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