• Home
  • Raw
  • Download

Lines Matching refs:pos

401 	loff_t pos;  in rw_verify_area()  local
407 pos = *ppos; in rw_verify_area()
408 if (unlikely(pos < 0)) { in rw_verify_area()
411 if (count >= -pos) /* both values are in 0..LLONG_MAX */ in rw_verify_area()
413 } else if (unlikely((loff_t) (pos + count) < 0)) { in rw_verify_area()
419 retval = locks_mandatory_area(inode, file, pos, pos + count - 1, in rw_verify_area()
446 loff_t *pos) in __vfs_read() argument
449 return file->f_op->read(file, buf, count, pos); in __vfs_read()
451 return new_sync_read(file, buf, count, pos); in __vfs_read()
457 ssize_t vfs_read(struct file *file, char __user *buf, size_t count, loff_t *pos) in vfs_read() argument
468 ret = rw_verify_area(READ, file, pos, count); in vfs_read()
472 ret = __vfs_read(file, buf, count, pos); in vfs_read()
504 loff_t *pos) in __vfs_write() argument
507 return file->f_op->write(file, p, count, pos); in __vfs_write()
509 return new_sync_write(file, p, count, pos); in __vfs_write()
515 ssize_t __kernel_write(struct file *file, const char *buf, size_t count, loff_t *pos) in __kernel_write() argument
529 ret = __vfs_write(file, p, count, pos); in __kernel_write()
541 ssize_t vfs_write(struct file *file, const char __user *buf, size_t count, loff_t *pos) in vfs_write() argument
552 ret = rw_verify_area(WRITE, file, pos, count); in vfs_write()
557 ret = __vfs_write(file, buf, count, pos); in vfs_write()
576 static inline void file_pos_write(struct file *file, loff_t pos) in file_pos_write() argument
578 file->f_pos = pos; in file_pos_write()
587 loff_t pos = file_pos_read(f.file); in SYSCALL_DEFINE3() local
588 ret = vfs_read(f.file, buf, count, &pos); in SYSCALL_DEFINE3()
590 file_pos_write(f.file, pos); in SYSCALL_DEFINE3()
603 loff_t pos = file_pos_read(f.file); in SYSCALL_DEFINE3() local
604 ret = vfs_write(f.file, buf, count, &pos); in SYSCALL_DEFINE3()
606 file_pos_write(f.file, pos); in SYSCALL_DEFINE3()
614 size_t, count, loff_t, pos) in SYSCALL_DEFINE4() argument
619 if (pos < 0) in SYSCALL_DEFINE4()
626 ret = vfs_read(f.file, buf, count, &pos); in SYSCALL_DEFINE4()
634 size_t, count, loff_t, pos) in SYSCALL_DEFINE4() argument
639 if (pos < 0) in SYSCALL_DEFINE4()
646 ret = vfs_write(f.file, buf, count, &pos); in SYSCALL_DEFINE4()
845 unsigned long nr_segs, loff_t *pos, in do_readv_writev() argument
862 ret = rw_verify_area(type, file, pos, tot_len); in do_readv_writev()
871 ret = do_iter_readv_writev(file, &iter, pos, type, flags); in do_readv_writev()
873 ret = do_loop_readv_writev(file, &iter, pos, type, flags); in do_readv_writev()
890 unsigned long vlen, loff_t *pos, int flags) in vfs_readv() argument
897 return do_readv_writev(READ, file, vec, vlen, pos, flags); in vfs_readv()
903 unsigned long vlen, loff_t *pos, int flags) in vfs_writev() argument
910 return do_readv_writev(WRITE, file, vec, vlen, pos, flags); in vfs_writev()
922 loff_t pos = file_pos_read(f.file); in do_readv() local
923 ret = vfs_readv(f.file, vec, vlen, &pos, flags); in do_readv()
925 file_pos_write(f.file, pos); in do_readv()
942 loff_t pos = file_pos_read(f.file); in do_writev() local
943 ret = vfs_writev(f.file, vec, vlen, &pos, flags); in do_writev()
945 file_pos_write(f.file, pos); in do_writev()
962 unsigned long vlen, loff_t pos, int flags) in do_preadv() argument
967 if (pos < 0) in do_preadv()
974 ret = vfs_readv(f.file, vec, vlen, &pos, flags); in do_preadv()
985 unsigned long vlen, loff_t pos, int flags) in do_pwritev() argument
990 if (pos < 0) in do_pwritev()
997 ret = vfs_writev(f.file, vec, vlen, &pos, flags); in do_pwritev()
1022 loff_t pos = pos_from_hilo(pos_h, pos_l); in SYSCALL_DEFINE5() local
1024 return do_preadv(fd, vec, vlen, pos, 0); in SYSCALL_DEFINE5()
1031 loff_t pos = pos_from_hilo(pos_h, pos_l); in SYSCALL_DEFINE6() local
1033 if (pos == -1) in SYSCALL_DEFINE6()
1036 return do_preadv(fd, vec, vlen, pos, flags); in SYSCALL_DEFINE6()
1042 loff_t pos = pos_from_hilo(pos_h, pos_l); in SYSCALL_DEFINE5() local
1044 return do_pwritev(fd, vec, vlen, pos, 0); in SYSCALL_DEFINE5()
1051 loff_t pos = pos_from_hilo(pos_h, pos_l); in SYSCALL_DEFINE6() local
1053 if (pos == -1) in SYSCALL_DEFINE6()
1056 return do_pwritev(fd, vec, vlen, pos, flags); in SYSCALL_DEFINE6()
1063 unsigned long nr_segs, loff_t *pos, in compat_do_readv_writev() argument
1080 ret = rw_verify_area(type, file, pos, tot_len); in compat_do_readv_writev()
1089 ret = do_iter_readv_writev(file, &iter, pos, type, flags); in compat_do_readv_writev()
1091 ret = do_loop_readv_writev(file, &iter, pos, type, flags); in compat_do_readv_writev()
1109 unsigned long vlen, loff_t *pos, int flags) in compat_readv() argument
1120 ret = compat_do_readv_writev(READ, file, vec, vlen, pos, flags); in compat_readv()
1135 loff_t pos; in do_compat_readv() local
1139 pos = f.file->f_pos; in do_compat_readv()
1140 ret = compat_readv(f.file, vec, vlen, &pos, flags); in do_compat_readv()
1142 f.file->f_pos = pos; in do_compat_readv()
1157 unsigned long vlen, loff_t pos, int flags) in do_compat_preadv64() argument
1162 if (pos < 0) in do_compat_preadv64()
1169 ret = compat_readv(f.file, vec, vlen, &pos, flags); in do_compat_preadv64()
1177 unsigned long, vlen, loff_t, pos) in COMPAT_SYSCALL_DEFINE4() argument
1179 return do_compat_preadv64(fd, vec, vlen, pos, 0); in COMPAT_SYSCALL_DEFINE4()
1187 loff_t pos = ((loff_t)pos_high << 32) | pos_low; in COMPAT_SYSCALL_DEFINE5() local
1189 return do_compat_preadv64(fd, vec, vlen, pos, 0); in COMPAT_SYSCALL_DEFINE5()
1195 unsigned long, vlen, loff_t, pos, int, flags) in COMPAT_SYSCALL_DEFINE5() argument
1197 return do_compat_preadv64(fd, vec, vlen, pos, flags); in COMPAT_SYSCALL_DEFINE5()
1206 loff_t pos = ((loff_t)pos_high << 32) | pos_low; in COMPAT_SYSCALL_DEFINE6() local
1208 if (pos == -1) in COMPAT_SYSCALL_DEFINE6()
1211 return do_compat_preadv64(fd, vec, vlen, pos, flags); in COMPAT_SYSCALL_DEFINE6()
1216 unsigned long vlen, loff_t *pos, int flags) in compat_writev() argument
1227 ret = compat_do_readv_writev(WRITE, file, vec, vlen, pos, flags); in compat_writev()
1242 loff_t pos; in do_compat_writev() local
1246 pos = f.file->f_pos; in do_compat_writev()
1247 ret = compat_writev(f.file, vec, vlen, &pos, flags); in do_compat_writev()
1249 f.file->f_pos = pos; in do_compat_writev()
1263 unsigned long vlen, loff_t pos, int flags) in do_compat_pwritev64() argument
1268 if (pos < 0) in do_compat_pwritev64()
1275 ret = compat_writev(f.file, vec, vlen, &pos, flags); in do_compat_pwritev64()
1283 unsigned long, vlen, loff_t, pos) in COMPAT_SYSCALL_DEFINE4() argument
1285 return do_compat_pwritev64(fd, vec, vlen, pos, 0); in COMPAT_SYSCALL_DEFINE4()
1293 loff_t pos = ((loff_t)pos_high << 32) | pos_low; in COMPAT_SYSCALL_DEFINE5() local
1295 return do_compat_pwritev64(fd, vec, vlen, pos, 0); in COMPAT_SYSCALL_DEFINE5()
1301 unsigned long, vlen, loff_t, pos, int, flags) in COMPAT_SYSCALL_DEFINE5() argument
1303 return do_compat_pwritev64(fd, vec, vlen, pos, flags); in COMPAT_SYSCALL_DEFINE5()
1311 loff_t pos = ((loff_t)pos_high << 32) | pos_low; in COMPAT_SYSCALL_DEFINE6() local
1313 if (pos == -1) in COMPAT_SYSCALL_DEFINE6()
1316 return do_compat_pwritev64(fd, vec, vlen, pos, flags); in COMPAT_SYSCALL_DEFINE6()
1326 loff_t pos; in do_sendfile() local
1342 pos = in.file->f_pos; in do_sendfile()
1344 pos = *ppos; in do_sendfile()
1348 retval = rw_verify_area(READ, in.file, &pos, count); in do_sendfile()
1374 if (unlikely(pos + count > max)) { in do_sendfile()
1376 if (pos >= max) in do_sendfile()
1378 count = max - pos; in do_sendfile()
1393 retval = do_splice_direct(in.file, &pos, out.file, &out_pos, count, fl); in do_sendfile()
1403 *ppos = pos; in do_sendfile()
1405 in.file->f_pos = pos; in do_sendfile()
1410 if (pos > max) in do_sendfile()
1423 loff_t pos; in SYSCALL_DEFINE4() local
1430 pos = off; in SYSCALL_DEFINE4()
1431 ret = do_sendfile(out_fd, in_fd, &pos, count, MAX_NON_LFS); in SYSCALL_DEFINE4()
1432 if (unlikely(put_user(pos, offset))) in SYSCALL_DEFINE4()
1442 loff_t pos; in SYSCALL_DEFINE4() local
1446 if (unlikely(copy_from_user(&pos, offset, sizeof(loff_t)))) in SYSCALL_DEFINE4()
1448 ret = do_sendfile(out_fd, in_fd, &pos, count, 0); in SYSCALL_DEFINE4()
1449 if (unlikely(put_user(pos, offset))) in SYSCALL_DEFINE4()
1461 loff_t pos; in COMPAT_SYSCALL_DEFINE4() local
1468 pos = off; in COMPAT_SYSCALL_DEFINE4()
1469 ret = do_sendfile(out_fd, in_fd, &pos, count, MAX_NON_LFS); in COMPAT_SYSCALL_DEFINE4()
1470 if (unlikely(put_user(pos, offset))) in COMPAT_SYSCALL_DEFINE4()
1481 loff_t pos; in COMPAT_SYSCALL_DEFINE4() local
1485 if (unlikely(copy_from_user(&pos, offset, sizeof(loff_t)))) in COMPAT_SYSCALL_DEFINE4()
1487 ret = do_sendfile(out_fd, in_fd, &pos, count, 0); in COMPAT_SYSCALL_DEFINE4()
1488 if (unlikely(put_user(pos, offset))) in COMPAT_SYSCALL_DEFINE4()
1627 static int clone_verify_area(struct file *file, loff_t pos, u64 len, bool write) in clone_verify_area() argument
1631 if (unlikely(pos < 0)) in clone_verify_area()
1634 if (unlikely((loff_t) (pos + len) < 0)) in clone_verify_area()
1638 loff_t end = len ? pos + len - 1 : OFFSET_MAX; in clone_verify_area()
1641 retval = locks_mandatory_area(inode, file, pos, end, in clone_verify_area()