Return-Path: linux-nfs-owner@vger.kernel.org Received: from mx12.netapp.com ([216.240.18.77]:50696 "EHLO mx12.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756191Ab2JVVUg (ORCPT ); Mon, 22 Oct 2012 17:20:36 -0400 From: "Myklebust, Trond" To: Chris Perl CC: "linux-nfs@vger.kernel.org" Subject: Re: RPC Race Condition Date: Mon, 22 Oct 2012 21:20:34 +0000 Message-ID: <4FA345DA4F4AE44899BD2B03EEEC2FA90928AB39@SACEXCMBX04-PRD.hq.netapp.com> References: <20121022180339.GC24763@nyc-qws-132.nyc.delacy.com> <4FA345DA4F4AE44899BD2B03EEEC2FA909289403@SACEXCMBX04-PRD.hq.netapp.com> <20121022202611.GA27191@nyc-qws-132.nyc.delacy.com> In-Reply-To: <20121022202611.GA27191@nyc-qws-132.nyc.delacy.com> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Sender: linux-nfs-owner@vger.kernel.org List-ID: T24gTW9uLCAyMDEyLTEwLTIyIGF0IDE2OjI2IC0wNDAwLCBDaHJpcyBQZXJsIHdyb3RlOg0KPiBP biBNb24sIE9jdCAyMiwgMjAxMiBhdCAwNjoyODowMlBNICswMDAwLCBNeWtsZWJ1c3QsIFRyb25k IHdyb3RlOg0KPiA+IEhpIENocmlzLA0KPiA+IA0KPiA+IFRoYW5rcyBmb3IgaGVscGluZyB0byBk ZWJ1ZyB0aGlzLCBhbmQgZm9yIHByb3ZpZGluZyBzdWNoIGEgdGhvcm91Z2gNCj4gPiBhbmFseXNp cyEgVGhpcyBpcyBncmVhdCB3b3JrIQ0KPiA+IA0KPiA+IERvZXMgYWRkaW5nIGEgY2hlY2sgaW4g eHNfZXJyb3JfcmVwb3J0KCkgZm9yIHhwcnRfY29ubmVjdGluZyh4cHJ0KSBzbw0KPiA+IHRoYXQg d2Ugc2tpcCB0aGUgY2FsbCB0byB4cHJ0X3dha2VfcGVuZGluZ190YXNrcygpIGlmIHRydWUsIGhl bHAgd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