From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gjMLG-0008RI-PA for barebox@lists.infradead.org; Tue, 15 Jan 2019 10:53:12 +0000 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Tue, 15 Jan 2019 11:53:05 +0100 Message-Id: <20190115105305.19940-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH] fs: nfs: copy data from rpc replies to local storage To: barebox@lists.infradead.org VGhlIG5mcyBjb2RlIHVzZXMgZGF0YSBwcm92aWRlZCB0byB0aGUgcGFja2V0IGhhbmRsZXIgYWZ0 ZXIgbmV0X3BvbGwoKQpyZXR1cm5lZC4gQnV0IHRoZSBsaWZlIHRpbWUgb2YgdGhpcyBkYXRhIGFs cmVhZHkgZW5kZWQgd2hlbiBuZXRfcG9sbCgpCnJldHVybnMuIE1vc3Qgb2YgdGhlIHRpbWUgaXQg aXMgcG9zc2libGUgdG8gZ2V0IGF3YXkgaGVyZSBidXQgb24gaS5NWDI4CnRoZSBkYXRhIGlzIG92 ZXJ3cml0dGVuIHNpbmNlIGNvbW1pdCA4MmVjMjg5MjljYzkgKCJuZXQ6IGZlY19pbXg6IERvIG5v dAp1c2UgRE1BIGNvaGVyZW50IG1lbW9yeSBmb3IgUnggYnVmZmVycyIpLgoKU28gdGhlIGRhdGEg ZnJvbSB0aGUgcGFja2V0IGlzIGNvcGllZCB0byBhIG1hbGxvY2VkIGJ1ZmZlci4gVG8gZWFzZQp0 cmFja2luZyB0aGUgbGlmZXRpbWUgb2YgdGhpcyBidWZmZXIgbGV0IHJ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