lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 1 Aug 2020 13:12:22 +0300
From:   Pavel Begunkov <asml.silence@...il.com>
To:     Christoph Hellwig <hch@...radead.org>
Cc:     Alexander Viro <viro@...iv.linux.org.uk>,
        linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] splice: direct call for default_file_splice*()

On 30/01/2020 19:54, Christoph Hellwig wrote:
> On Mon, Jan 20, 2020 at 11:49:46PM +0300, Pavel Begunkov wrote:
>> Indirect calls could be very expensive nowadays, so try to use direct calls
>> whenever possible.

Hah, I'm surprised to find it as
00c285d0d0fe4 ("fs: simplify do_splice_from").

Christoph, even though this one is not a big deal, I'm finding the
practice of taking others patches and silently sending them as yours
own in general disgusting. Just for you to know.


> 
> ... and independent of that your new version is much shorter and easier
> to read.  But it could be improved a tiny little bit further:
> 
>>  	if (out->f_op->splice_write)
>> -		splice_write = out->f_op->splice_write;
>> +		return out->f_op->splice_write(pipe, out, ppos, len, flags);
>>  	else
>> -		splice_write = default_file_splice_write;
>> -
>> -	return splice_write(pipe, out, ppos, len, flags);
>> +		return default_file_splice_write(pipe, out, ppos, len, flags);
> 
> No need for the else after an return.
> 
>>  	if (in->f_op->splice_read)
>> -		splice_read = in->f_op->splice_read;
>> +		return in->f_op->splice_read(in, ppos, pipe, len, flags);
>>  	else
>> -		splice_read = default_file_splice_read;
>> -
>> -	return splice_read(in, ppos, pipe, len, flags);
>> +		return default_file_splice_read(in, ppos, pipe, len, flags);
> 
> Same here.
> 

-- 
Pavel Begunkov

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ