Return-Path: Received: from mail-eopbgr680100.outbound.protection.outlook.com ([40.107.68.100]:59648 "EHLO NAM04-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726844AbeIRCOX (ORCPT ); Mon, 17 Sep 2018 22:14:23 -0400 From: Trond Myklebust To: "linux-nfs@vger.kernel.org" Subject: Re: [PATCH v3 40/44] SUNRPC: Simplify TCP receive code by switching to using iterators Date: Mon, 17 Sep 2018 20:44:12 +0000 Message-ID: <0b8e0fd8a4acf588314e936546c724bcaad90f33.camel@hammerspace.com> In-Reply-To: <20180917130335.112832-41-trond.myklebust@hammerspace.com> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Sender: linux-nfs-owner@vger.kernel.org List-ID: T24gTW9uLCAyMDE4LTA5LTE3IGF0IDA5OjAzIC0wNDAwLCBUcm9uZCBNeWtsZWJ1c3Qgd3JvdGU6 DQo+IE1vc3Qgb2YgdGhpcyBjb2RlIHNob3VsZCBhbHNvIGJlIHJldXNhYmxlIHdpdGggb3RoZXIg c29ja2V0IHR5cGVzLg0KPiANCj4gU2lnbmVkLW9mZi1ieTogVHJvbmQgTXlrbGVidXN0IDx0cm9u ZC5teWtsZWJ1c3RAaGFtbWVyc3BhY2UuY29tPg0KPiAtLS0NCj4gIGluY2x1ZGUvbGludXgvc3Vu cnBjL3hwcnRzb2NrLmggfCAgMTkgKy0NCj4gIGluY2x1ZGUvdHJhY2UvZXZlbnRzL3N1bnJwYy5o ICAgfCAgMTUgKy0NCj4gIG5ldC9zdW5ycGMveHBydHNvY2suYyAgICAgICAgICAgfCA2OTQgKysr KysrKysrKysrKysrLS0tLS0tLS0tLS0tLS0tDQo+IC0tDQo+ICAzIGZpbGVzIGNoYW5nZWQsIDMz NSBpbnNlcnRpb25zKCspLCAzOTMgZGVsZXRpb25zKC0pDQo+IA0KPiBkaWZmIC0tZ2l0IGEvaW5j bHVkZS9saW51eC9zdW5ycGMveHBydHNvY2suaA0KPiB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