aboutsummaryrefslogtreecommitdiffstats
path: root/fs/read_write.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/read_write.c')
-rw-r--r--fs/read_write.c24
1 files changed, 20 insertions, 4 deletions
diff --git a/fs/read_write.c b/fs/read_write.c
index 940367f51f2a..7a8326bc5903 100644
--- a/fs/read_write.c
+++ b/fs/read_write.c
@@ -403,8 +403,8 @@ asmlinkage long sys_write(unsigned int fd, const char __user * buf, size_t count
403 return ret; 403 return ret;
404} 404}
405 405
406asmlinkage long sys_pread64(unsigned int fd, char __user *buf, 406SYSCALL_DEFINE(pread64)(unsigned int fd, char __user *buf,
407 size_t count, loff_t pos) 407 size_t count, loff_t pos)
408{ 408{
409 struct file *file; 409 struct file *file;
410 ssize_t ret = -EBADF; 410 ssize_t ret = -EBADF;
@@ -423,9 +423,17 @@ asmlinkage long sys_pread64(unsigned int fd, char __user *buf,
423 423
424 return ret; 424 return ret;
425} 425}
426#ifdef CONFIG_HAVE_SYSCALL_WRAPPERS
427asmlinkage long SyS_pread64(long fd, long buf, long count, loff_t pos)
428{
429 return SYSC_pread64((unsigned int) fd, (char __user *) buf,
430 (size_t) count, pos);
431}
432SYSCALL_ALIAS(sys_pread64, SyS_pread64);
433#endif
426 434
427asmlinkage long sys_pwrite64(unsigned int fd, const char __user *buf, 435SYSCALL_DEFINE(pwrite64)(unsigned int fd, const char __user *buf,
428 size_t count, loff_t pos) 436 size_t count, loff_t pos)
429{ 437{
430 struct file *file; 438 struct file *file;
431 ssize_t ret = -EBADF; 439 ssize_t ret = -EBADF;
@@ -444,6 +452,14 @@ asmlinkage long sys_pwrite64(unsigned int fd, const char __user *buf,
444 452
445 return ret; 453 return ret;
446} 454}
455#ifdef CONFIG_HAVE_SYSCALL_WRAPPERS
456asmlinkage long SyS_pwrite64(long fd, long buf, long count, loff_t pos)
457{
458 return SYSC_pwrite64((unsigned int) fd, (const char __user *) buf,
459 (size_t) count, pos);
460}
461SYSCALL_ALIAS(sys_pwrite64, SyS_pwrite64);
462#endif
447 463
448/* 464/*
449 * Reduce an iovec's length in-place. Return the resulting number of segments 465 * Reduce an iovec's length in-place. Return the resulting number of segments