[PATCH] Consolidate Linux sync_file_range implementations
Adhemerval Zanella
adhemerval.zanella@linaro.org
Tue Oct 11 14:05:00 GMT 2016
On 11/10/2016 08:16, Yury Norov wrote:
> Hi,
>
> Tested on aarch64/lp64 and aarch64/ilp32
>
> Few minor comments below
>
> Yury.
>
> On Mon, Oct 10, 2016 at 05:58:02PM -0300, Adhemerval Zanella wrote:
>> This patch consolidates all the sync_file_Range implementation for Linux
>
> sync_file_Range - typo?
Oops, I will fix it.
>> diff --git a/sysdeps/unix/sysv/linux/sync_file_range.c b/sysdeps/unix/sysv/linux/sync_file_range.c
>> index a8f4214..6797488 100644
>> --- a/sysdeps/unix/sysv/linux/sync_file_range.c
>> +++ b/sysdeps/unix/sysv/linux/sync_file_range.c
>> @@ -16,37 +16,18 @@
>> License along with the GNU C Library; if not, see
>> <http://www.gnu.org/licenses/>. */
>>
>> -#include <errno.h>
>> #include <fcntl.h>
>> -#include <sys/types.h>
>> -
>> #include <sysdep-cancel.h>
>> -#include <sys/syscall.h>
>> -
>>
>> -#ifdef __NR_sync_file_range
>> int
>> -sync_file_range (int fd, __off64_t from, __off64_t to, unsigned int flags)
>> +sync_file_range (int fd, __off64_t offset, __off64_t len, unsigned int flags)
>> {
>> +#if defined(__NR_sync_file_range2)
>
> Whitespace before brace?
Ack.
>
>> + return SYSCALL_CANCEL (sync_file_range2, fd, flags, SYSCALL_LL64 (offset),
>> + SYSCALL_LL64 (len));
>> +#elif defined(__NR_sync_file_range)
>
> And here.
Ack.
More information about the Libc-alpha
mailing list