Re: [PATCH v2 1/2] Add __do_ftruncate that truncates a struct file*

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 1/23/24 8:38 AM, Jens Axboe wrote:
>> diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
>> index fd9d12de7e92..e8c56986e751 100644
>> --- a/include/linux/syscalls.h
>> +++ b/include/linux/syscalls.h
>> @@ -1229,6 +1229,8 @@ static inline long ksys_lchown(const char __user *filename, uid_t user,
>>  			     AT_SYMLINK_NOFOLLOW);
>>  }
>>  
>> +extern long __do_ftruncate(struct file *file, loff_t length, int small);
>> +
>>  extern long do_sys_ftruncate(unsigned int fd, loff_t length, int small);
>>  
>>  static inline long ksys_ftruncate(unsigned int fd, loff_t length)
> 
> This should go in fs/internal.h, it's not a syscall related thing.

And while at it, let's call it ftruncate_file() as that more accurately
describes what it does.

-- 
Jens Axboe





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux