Skip to content

Commit 8e742aa

Browse files
Jiri SlabyKAGA-KOKO
authored andcommitted
syscalls: Fix offset type of ksys_ftruncate()
After the commit below, truncate() on x86 32bit uses ksys_ftruncate(). But ksys_ftruncate() truncates the offset to unsigned long. Switch the type of offset to loff_t which is what do_sys_ftruncate() expects. Fixes: 121b32a (x86/entry/32: Use IA32-specific wrappers for syscalls taking 64-bit arguments) Signed-off-by: Jiri Slaby <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Brian Gerst <[email protected]> Cc: [email protected] Link: https://lkml.kernel.org/r/[email protected]
1 parent 2c18bd5 commit 8e742aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/linux/syscalls.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1360,7 +1360,7 @@ static inline long ksys_lchown(const char __user *filename, uid_t user,
13601360

13611361
extern long do_sys_ftruncate(unsigned int fd, loff_t length, int small);
13621362

1363-
static inline long ksys_ftruncate(unsigned int fd, unsigned long length)
1363+
static inline long ksys_ftruncate(unsigned int fd, loff_t length)
13641364
{
13651365
return do_sys_ftruncate(fd, length, 1);
13661366
}

0 commit comments

Comments
 (0)