From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from smtp.megiteam.pl ([31.186.83.105]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g57uH-0003JV-Ip for barebox@lists.infradead.org; Wed, 26 Sep 2018 11:23:03 +0000 References: <20180926081029.28103-1-s.hauer@pengutronix.de> <87r2hg3470.fsf@grinn-global.com> From: Marcin =?utf-8?Q?Niestr=C3=B3j?= In-reply-to: <87r2hg3470.fsf@grinn-global.com> Date: Wed, 26 Sep 2018 13:22:28 +0200 Message-ID: <87pnx033m3.fsf@grinn-global.com> 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: Re: [PATCH] fs: ramfs: make chunk counting in truncate() better readable To: Sascha Hauer Cc: Barebox List CkkgdGhpbmsgSSB3YXMgYSBsaXR0bGUgYml0IHRvbyBlYXJseSB3aXRoIHJldmlldyA6KSBCZWxv dyBJIGhhdmUgc29tZQpjb21tZW50cy4KCk1hcmNpbiBOaWVzdHLDs2ogPG0ubmllc3Ryb2pAZ3Jp bm4tZ2xvYmFsLmNvbT4gd3JpdGVzOgoKPiBTYXNjaGEgSGF1ZXIgPHMuaGF1ZXJAcGVuZ3V0cm9u aXguZGU+IHdyaXRlczoKPgo+PiBJbiByYW1mc190cnVuY2F0ZSgpICJuZXdjaHVua3MiIGRlbm90 ZXMgdGhlIG51bWJlciBvZiBjaHVua3Mgd2UKPj4gd2FudCB0byBoYXZlIGFmdGVyIHRoZSBjYWxs LiBXZSBkZWNyZWFzZSB0aGF0IG51bWJlciB3aGlsZSBpdGVyYXRpbmcKPj4gb3ZlciB0aGUgZXhp c3RpbmcgY2h1bmtzIGFuZCBkZWNyZWFzZSBpdCBmdXJ0aGVyIHdpdGggZXZlcnkgbmV3bHkKPj4g Y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