Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753210AbcLKKBg (ORCPT ); Sun, 11 Dec 2016 05:01:36 -0500 Received: from mail-oi0-f67.google.com ([209.85.218.67]:33995 "EHLO mail-oi0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752924AbcLKKBd (ORCPT ); Sun, 11 Dec 2016 05:01:33 -0500 MIME-Version: 1.0 X-Originating-IP: [217.173.44.24] In-Reply-To: <20161211023902.GA24547@ZenIV.linux.org.uk> References: <20161210204145.GK2622@veci.piliscsaba.szeredi.hu> <20161211023620.GL1555@ZenIV.linux.org.uk> <20161211023902.GA24547@ZenIV.linux.org.uk> From: Miklos Szeredi Date: Sun, 11 Dec 2016 11:01:32 +0100 Message-ID: Subject: Re: [GIT PULL] readlink cleanup To: Al Viro Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, "linux-unionfs@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1112 Lines: 33 On Sun, Dec 11, 2016 at 3:39 AM, Al Viro wrote: > On Sun, Dec 11, 2016 at 02:36:20AM +0000, Al Viro wrote: > >> I'm still not sure what does "vfs: convert ->readlink to same signature as >> ->get_link" buy us. If anything, the result appears to be more complex - >> you make freeing that buffer delayed (and introduce a dynamically allocated >> buffer in one case that didn't use it)... Normally readlink(2) calls ->get_link() except if there's ->readlink(). So there's no added complexity in handling the delayed free since it's already there. In fact it allows for removal of complexity. But I think the diffstat of that last part speaks for itself: 11 files changed, 76 insertions(+), 110 deletions(-) Btw, in the one case where we added the dynamically allocated buffer it had been: - guess max link size to be 50 (very scientifically I'm sure, but no explanation given) - call filler - hope it didn't get truncated Which is now - call filler to allocate correctly sized buffer Which isn't even much more complex. So I don't buy your arguments. Thanks, Miklos