Return-Path: linux-nfs-owner@vger.kernel.org Received: from mx2.netapp.com ([216.240.18.37]:12740 "EHLO mx2.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754464Ab2HPXuM (ORCPT ); Thu, 16 Aug 2012 19:50:12 -0400 From: "Myklebust, Trond" To: Shai Lazmi CC: William Dauchy , "Schumaker, Bryan" , "linux-nfs@vger.kernel.org" Subject: Re: [PATCH 1/2] NFS: Clear key construction data if the idmap upcall fails Date: Thu, 16 Aug 2012 23:49:54 +0000 Message-ID: <4FA345DA4F4AE44899BD2B03EEEC2FA93B542B@SACEXCMBX04-PRD.hq.netapp.com> References: <1345148622-10845-1-git-send-email-Trond.Myklebust@netapp.com> <21641D3714F5AF449DC483E699E1124E86E640957F@AVEXMB2.qlogic.org> In-Reply-To: <21641D3714F5AF449DC483E699E1124E86E640957F@AVEXMB2.qlogic.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Sender: linux-nfs-owner@vger.kernel.org List-ID: T24gVGh1LCAyMDEyLTA4LTE2IGF0IDE2OjQ0IC0wNzAwLCBTaGFpIExhem1pIHdyb3RlOg0KPiBQ YXRjaCBmYWlscyB3aXRoICINCj4gZ2l0IGFwcGx5IC0tY2hlY2sNCj4gZmF0YWw6IHBhdGNoIGZy YWdtZW50IHdpdGhvdXQgaGVhZGVyIGF0IGxpbmUgMzE6IEBAIC0zODAsMTEgKzM4NywxMyBAQCBz dGF0aWMgY29uc3QgbWF0Y2hfdGFibGVfdCBuZnNfaWRtYXBfdG9rZW5zID0geyAgc3RhdGljIGlu dCBuZnNfaWRtYXBfbGVnYWN5X3VwY2FsbChzdHJ1Y3Qga2V5X2NvbnN0cnVjdGlvbiAqLCBjb25z dCBjaGFyICosIHZvaWQgKik7ICBzdGF0aWMgc3NpemVfdCBpZG1hcF9waXBlX2Rvd25jYWxsKHN0 cnVjdCBmaWxlICosIGNvbnN0IGNoYXIgX191c2VyICosDQo+ICINCg0KV2hhdCBlbWFpbCBh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25zdHJ1Y3Rpb24gKmNvbnMs DQo+ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgY2hhciAqb3AsDQo+ ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdm9pZCAqYXV4KQ0KPiAgew0KPiAr ICAgICAgIHN0cnVjdCBpZG1hcF9sZWdhY3lfdXBjYWxsZGF0YSAqZGF0YTsNCj4gICAgICAgICBz dHJ1Y3QgcnBjX3BpcGVfbXNnICptc2c7DQo+ICAgICAgICAgc3RydWN0IGlkbWFwX21zZyAqaW07 DQo+ICAgICAgICAgc3RydWN0IGlkbWFwICppZG1hcCA9IChzdHJ1Y3QgaWRtYXAgKilhdXg7DQo+ IEBAIC02NjYsMTUgKzY3NywxNSBAQCBzdGF0aWMgaW50IG5mc19pZG1hcF9sZWdhY3lfdXBjYWxs KHN0cnVjdCBrZXlfY29uc3RydWN0aW9uICpjb25zLA0KPiAgICAgICAgIGludCByZXQgPSAtRU5P TUVNOw0KPiANCj4gICAgICAgICAvKiBtc2cgYW5kIGltIGFyZSBmcmVlZCBpbiBpZG1hcF9waXBl X2Rlc3Ryb3lfbXNnICovDQo+IC0gICAgICAgbXNnID0ga21hbGxvYyhzaXplb2YoKm1zZyksIEdG UF9LRVJORUwpOw0KPiAtICAgICAgIGlmICghbXNnKQ0KPiAtICAgICAgICAgICAgICAgZ290byBv dXQwOw0KPiAtDQo+IC0gICAgICAgaW0gPSBrbWFsbG9jKHNpemVvZigqaW0pLCBHRlBfS0VSTkVM KTsNCj4gLSAgICAgICBpZiAoIWltKQ0KPiArICAgICAgIGRhdGEgPSBrbWFsbG9jKHNpemVvZigq ZGF0YSksIEdGUF9LRVJORUwpOw0KPiArICAgICAgIGlmICghZGF0YSkNCj4gICAgICAgICAgICAg ICAgIGdvdG8gb3V0MTsNCj4gDQo+IC0gICAgICAgcmV0ID0gbmZzX2lkbWFwX3ByZXBhcmVfbWVz c2FnZShrZXktPmRlc2NyaXB0aW9uLCBp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