• Home
  • Raw
  • Download

Lines Matching refs:pos

380 		loff_t pos = *ppos;  in rw_verify_area()  local
382 if (unlikely(pos < 0)) { in rw_verify_area()
385 if (count >= -pos) /* both values are in 0..LLONG_MAX */ in rw_verify_area()
387 } else if (unlikely((loff_t) (pos + count) < 0)) { in rw_verify_area()
393 retval = locks_mandatory_area(inode, file, pos, pos + count - 1, in rw_verify_area()
430 ssize_t __kernel_read(struct file *file, void *buf, size_t count, loff_t *pos) in __kernel_read() argument
452 kiocb.ki_pos = pos ? *pos : 0; in __kernel_read()
456 if (pos) in __kernel_read()
457 *pos = kiocb.ki_pos; in __kernel_read()
465 ssize_t kernel_read(struct file *file, void *buf, size_t count, loff_t *pos) in kernel_read() argument
469 ret = rw_verify_area(READ, file, pos, count); in kernel_read()
472 return __kernel_read(file, buf, count, pos); in kernel_read()
476 ssize_t vfs_read(struct file *file, char __user *buf, size_t count, loff_t *pos) in vfs_read() argument
487 ret = rw_verify_area(READ, file, pos, count); in vfs_read()
494 ret = file->f_op->read(file, buf, count, pos); in vfs_read()
496 ret = new_sync_read(file, buf, count, pos); in vfs_read()
526 ssize_t __kernel_write(struct file *file, const void *buf, size_t count, loff_t *pos) in __kernel_write() argument
548 kiocb.ki_pos = pos ? *pos : 0; in __kernel_write()
552 if (pos) in __kernel_write()
553 *pos = kiocb.ki_pos; in __kernel_write()
570 loff_t *pos) in kernel_write() argument
574 ret = rw_verify_area(WRITE, file, pos, count); in kernel_write()
579 ret = __kernel_write(file, buf, count, pos); in kernel_write()
585 ssize_t vfs_write(struct file *file, const char __user *buf, size_t count, loff_t *pos) in vfs_write() argument
596 ret = rw_verify_area(WRITE, file, pos, count); in vfs_write()
603 ret = file->f_op->write(file, buf, count, pos); in vfs_write()
605 ret = new_sync_write(file, buf, count, pos); in vfs_write()
629 loff_t pos, *ppos = file_ppos(f.file); in ksys_read() local
631 pos = *ppos; in ksys_read()
632 ppos = &pos; in ksys_read()
636 f.file->f_pos = pos; in ksys_read()
653 loff_t pos, *ppos = file_ppos(f.file); in ksys_write() local
655 pos = *ppos; in ksys_write()
656 ppos = &pos; in ksys_write()
660 f.file->f_pos = pos; in ksys_write()
674 loff_t pos) in ksys_pread64() argument
679 if (pos < 0) in ksys_pread64()
686 ret = vfs_read(f.file, buf, count, &pos); in ksys_pread64()
694 size_t, count, loff_t, pos) in SYSCALL_DEFINE4() argument
696 return ksys_pread64(fd, buf, count, pos); in SYSCALL_DEFINE4()
700 size_t count, loff_t pos) in ksys_pwrite64() argument
705 if (pos < 0) in ksys_pwrite64()
712 ret = vfs_write(f.file, buf, count, &pos); in ksys_pwrite64()
720 size_t, count, loff_t, pos) in SYSCALL_DEFINE4() argument
722 return ksys_pwrite64(fd, buf, count, pos); in SYSCALL_DEFINE4()
783 loff_t *pos, rwf_t flags) in do_iter_read() argument
796 ret = rw_verify_area(READ, file, pos, tot_len); in do_iter_read()
801 ret = do_iter_readv_writev(file, iter, pos, READ, flags); in do_iter_read()
803 ret = do_loop_readv_writev(file, iter, pos, READ, flags); in do_iter_read()
848 loff_t *pos, rwf_t flags) in do_iter_write() argument
861 ret = rw_verify_area(WRITE, file, pos, tot_len); in do_iter_write()
866 ret = do_iter_readv_writev(file, iter, pos, WRITE, flags); in do_iter_write()
868 ret = do_loop_readv_writev(file, iter, pos, WRITE, flags); in do_iter_write()
912 unsigned long vlen, loff_t *pos, rwf_t flags) in vfs_readv() argument
921 ret = do_iter_read(file, &iter, pos, flags); in vfs_readv()
929 unsigned long vlen, loff_t *pos, rwf_t flags) in vfs_writev() argument
939 ret = do_iter_write(file, &iter, pos, flags); in vfs_writev()
953 loff_t pos, *ppos = file_ppos(f.file); in do_readv() local
955 pos = *ppos; in do_readv()
956 ppos = &pos; in do_readv()
960 f.file->f_pos = pos; in do_readv()
977 loff_t pos, *ppos = file_ppos(f.file); in do_writev() local
979 pos = *ppos; in do_writev()
980 ppos = &pos; in do_writev()
984 f.file->f_pos = pos; in do_writev()
1001 unsigned long vlen, loff_t pos, rwf_t flags) in do_preadv() argument
1006 if (pos < 0) in do_preadv()
1013 ret = vfs_readv(f.file, vec, vlen, &pos, flags); in do_preadv()
1024 unsigned long vlen, loff_t pos, rwf_t flags) in do_pwritev() argument
1029 if (pos < 0) in do_pwritev()
1036 ret = vfs_writev(f.file, vec, vlen, &pos, flags); in do_pwritev()
1061 loff_t pos = pos_from_hilo(pos_h, pos_l); in SYSCALL_DEFINE5() local
1063 return do_preadv(fd, vec, vlen, pos, 0); in SYSCALL_DEFINE5()
1070 loff_t pos = pos_from_hilo(pos_h, pos_l); in SYSCALL_DEFINE6() local
1072 if (pos == -1) in SYSCALL_DEFINE6()
1075 return do_preadv(fd, vec, vlen, pos, flags); in SYSCALL_DEFINE6()
1081 loff_t pos = pos_from_hilo(pos_h, pos_l); in SYSCALL_DEFINE5() local
1083 return do_pwritev(fd, vec, vlen, pos, 0); in SYSCALL_DEFINE5()
1090 loff_t pos = pos_from_hilo(pos_h, pos_l); in SYSCALL_DEFINE6() local
1092 if (pos == -1) in SYSCALL_DEFINE6()
1095 return do_pwritev(fd, vec, vlen, pos, flags); in SYSCALL_DEFINE6()
1107 unsigned long, vlen, loff_t, pos) in COMPAT_SYSCALL_DEFINE4() argument
1109 return do_preadv(fd, vec, vlen, pos, 0); in COMPAT_SYSCALL_DEFINE4()
1117 loff_t pos = ((loff_t)pos_high << 32) | pos_low; in COMPAT_SYSCALL_DEFINE5() local
1119 return do_preadv(fd, vec, vlen, pos, 0); in COMPAT_SYSCALL_DEFINE5()
1125 unsigned long, vlen, loff_t, pos, rwf_t, flags) in COMPAT_SYSCALL_DEFINE5() argument
1127 if (pos == -1) in COMPAT_SYSCALL_DEFINE5()
1129 return do_preadv(fd, vec, vlen, pos, flags); in COMPAT_SYSCALL_DEFINE5()
1138 loff_t pos = ((loff_t)pos_high << 32) | pos_low; in COMPAT_SYSCALL_DEFINE6() local
1140 if (pos == -1) in COMPAT_SYSCALL_DEFINE6()
1142 return do_preadv(fd, vec, vlen, pos, flags); in COMPAT_SYSCALL_DEFINE6()
1148 unsigned long, vlen, loff_t, pos) in COMPAT_SYSCALL_DEFINE4() argument
1150 return do_pwritev(fd, vec, vlen, pos, 0); in COMPAT_SYSCALL_DEFINE4()
1158 loff_t pos = ((loff_t)pos_high << 32) | pos_low; in COMPAT_SYSCALL_DEFINE5() local
1160 return do_pwritev(fd, vec, vlen, pos, 0); in COMPAT_SYSCALL_DEFINE5()
1166 unsigned long, vlen, loff_t, pos, rwf_t, flags) in COMPAT_SYSCALL_DEFINE5() argument
1168 if (pos == -1) in COMPAT_SYSCALL_DEFINE5()
1170 return do_pwritev(fd, vec, vlen, pos, flags); in COMPAT_SYSCALL_DEFINE5()
1178 loff_t pos = ((loff_t)pos_high << 32) | pos_low; in COMPAT_SYSCALL_DEFINE6() local
1180 if (pos == -1) in COMPAT_SYSCALL_DEFINE6()
1182 return do_pwritev(fd, vec, vlen, pos, flags); in COMPAT_SYSCALL_DEFINE6()
1191 loff_t pos; in do_sendfile() local
1207 pos = in.file->f_pos; in do_sendfile()
1209 pos = *ppos; in do_sendfile()
1213 retval = rw_verify_area(READ, in.file, &pos, count); in do_sendfile()
1238 if (unlikely(pos + count > max)) { in do_sendfile()
1240 if (pos >= max) in do_sendfile()
1242 count = max - pos; in do_sendfile()
1257 retval = do_splice_direct(in.file, &pos, out.file, &out_pos, count, fl); in do_sendfile()
1267 *ppos = pos; in do_sendfile()
1269 in.file->f_pos = pos; in do_sendfile()
1274 if (pos > max) in do_sendfile()
1287 loff_t pos; in SYSCALL_DEFINE4() local
1294 pos = off; in SYSCALL_DEFINE4()
1295 ret = do_sendfile(out_fd, in_fd, &pos, count, MAX_NON_LFS); in SYSCALL_DEFINE4()
1296 if (unlikely(put_user(pos, offset))) in SYSCALL_DEFINE4()
1306 loff_t pos; in SYSCALL_DEFINE4() local
1310 if (unlikely(copy_from_user(&pos, offset, sizeof(loff_t)))) in SYSCALL_DEFINE4()
1312 ret = do_sendfile(out_fd, in_fd, &pos, count, 0); in SYSCALL_DEFINE4()
1313 if (unlikely(put_user(pos, offset))) in SYSCALL_DEFINE4()
1325 loff_t pos; in COMPAT_SYSCALL_DEFINE4() local
1332 pos = off; in COMPAT_SYSCALL_DEFINE4()
1333 ret = do_sendfile(out_fd, in_fd, &pos, count, MAX_NON_LFS); in COMPAT_SYSCALL_DEFINE4()
1334 if (unlikely(put_user(pos, offset))) in COMPAT_SYSCALL_DEFINE4()
1345 loff_t pos; in COMPAT_SYSCALL_DEFINE4() local
1349 if (unlikely(copy_from_user(&pos, offset, sizeof(loff_t)))) in COMPAT_SYSCALL_DEFINE4()
1351 ret = do_sendfile(out_fd, in_fd, &pos, count, 0); in COMPAT_SYSCALL_DEFINE4()
1352 if (unlikely(put_user(pos, offset))) in COMPAT_SYSCALL_DEFINE4()
1623 int generic_write_check_limits(struct file *file, loff_t pos, loff_t *count) in generic_write_check_limits() argument
1630 if (pos >= limit) { in generic_write_check_limits()
1634 *count = min(*count, limit - pos); in generic_write_check_limits()
1640 if (unlikely(pos >= max_size)) in generic_write_check_limits()
1643 *count = min(*count, max_size - pos); in generic_write_check_limits()