Return-Path: Received: from mail-eopbgr690092.outbound.protection.outlook.com ([40.107.69.92]:23279 "EHLO NAM04-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729732AbeISBx0 (ORCPT ); Tue, 18 Sep 2018 21:53:26 -0400 From: Trond Myklebust To: "linux-nfs@vger.kernel.org" , "schumaker.anna@gmail.com" Subject: Re: [PATCH 1/3] NFS: Split out the body of nfs4_reclaim_open_state() Date: Tue, 18 Sep 2018 20:19:09 +0000 Message-ID: <29df938ffcdb141596ae468eaa725397cf273027.camel@hammerspace.com> References: <20180911202348.23160-1-Anna.Schumaker@Netapp.com> In-Reply-To: <20180911202348.23160-1-Anna.Schumaker@Netapp.com> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Sender: linux-nfs-owner@vger.kernel.org List-ID: T24gVHVlLCAyMDE4LTA5LTExIGF0IDE2OjIzIC0wNDAwLCBzY2h1bWFrZXIuYW5uYUBnbWFpbC5j b20gd3JvdGU6DQo+IEZyb206IEFubmEgU2NodW1ha2VyIDxBbm5hLlNjaHVtYWtlckBOZXRhcHAu Y29tPg0KPiANCj4gTW92aW5nIGFsbCBvZiB0aGlzIGludG8gYSBuZXcgZnVuY3Rpb24gcmVtb3Zl cyB0aGUgbmVlZCBmb3IgY3JhbXBlZA0KPiBpbmRlbnRhdGlvbiwgbWFraW5nIHRoZSBjb2RlIG92 ZXJhbGwgZWFzaWVyIHRvIGxvb2sgYXQuICAgSSBhbHNvIHRha2UNCj4gdGhpcyBjaGFuY2UgdG8g c3dpdGNoIGNvcHkgcmVjb3Zlcnkgb3ZlciB0byB1c2luZw0KPiBuZnM0X3N0YXRlaWRfbWF0Y2hf b3RoZXIoKQ0KPiANCj4gU2lnbmVkLW9mZi1ieTogQW5uYSBTY2h1bWFrZXIgPEFubmEuU2NodW1h a2VyQE5ldGFwcC5jb20+DQo+IC0tLQ0KPiAgZnMvbmZzL25mczRzdGF0ZS5jIHwgODMgKysrK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