lkml.org 
[lkml]   [2016]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [GIT PULL] readlink cleanup
On Sun, Dec 11, 2016 at 3:39 AM, Al Viro <viro@zeniv.linux.org.uk> 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

\
 
 \ /
  Last update: 2016-12-11 11:02    [W:0.031 / U:4.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site