Lines Matching refs:f
269 static inline void fdput_pos(struct fd f) in fdput_pos() argument
271 if (f.flags & FDPUT_POS_UNLOCK) in fdput_pos()
272 mutex_unlock(&f.file->f_pos_lock); in fdput_pos()
273 fdput(f); in fdput_pos()
279 struct fd f = fdget_pos(fd); in SYSCALL_DEFINE3() local
280 if (!f.file) in SYSCALL_DEFINE3()
285 loff_t res = vfs_llseek(f.file, offset, whence); in SYSCALL_DEFINE3()
290 fdput_pos(f); in SYSCALL_DEFINE3()
307 struct fd f = fdget_pos(fd); in SYSCALL_DEFINE5() local
310 if (!f.file) in SYSCALL_DEFINE5()
317 offset = vfs_llseek(f.file, ((loff_t) offset_high << 32) | offset_low, in SYSCALL_DEFINE5()
327 fdput_pos(f); in SYSCALL_DEFINE5()
564 struct fd f = fdget_pos(fd); in SYSCALL_DEFINE3() local
567 if (f.file) { in SYSCALL_DEFINE3()
568 loff_t pos = file_pos_read(f.file); in SYSCALL_DEFINE3()
569 ret = vfs_read(f.file, buf, count, &pos); in SYSCALL_DEFINE3()
571 file_pos_write(f.file, pos); in SYSCALL_DEFINE3()
572 fdput_pos(f); in SYSCALL_DEFINE3()
580 struct fd f = fdget_pos(fd); in SYSCALL_DEFINE3() local
583 if (f.file) { in SYSCALL_DEFINE3()
584 loff_t pos = file_pos_read(f.file); in SYSCALL_DEFINE3()
585 ret = vfs_write(f.file, buf, count, &pos); in SYSCALL_DEFINE3()
587 file_pos_write(f.file, pos); in SYSCALL_DEFINE3()
588 fdput_pos(f); in SYSCALL_DEFINE3()
597 struct fd f; in SYSCALL_DEFINE4() local
603 f = fdget(fd); in SYSCALL_DEFINE4()
604 if (f.file) { in SYSCALL_DEFINE4()
606 if (f.file->f_mode & FMODE_PREAD) in SYSCALL_DEFINE4()
607 ret = vfs_read(f.file, buf, count, &pos); in SYSCALL_DEFINE4()
608 fdput(f); in SYSCALL_DEFINE4()
617 struct fd f; in SYSCALL_DEFINE4() local
623 f = fdget(fd); in SYSCALL_DEFINE4()
624 if (f.file) { in SYSCALL_DEFINE4()
626 if (f.file->f_mode & FMODE_PWRITE) in SYSCALL_DEFINE4()
627 ret = vfs_write(f.file, buf, count, &pos); in SYSCALL_DEFINE4()
628 fdput(f); in SYSCALL_DEFINE4()
855 struct fd f = fdget_pos(fd); in SYSCALL_DEFINE3() local
858 if (f.file) { in SYSCALL_DEFINE3()
859 loff_t pos = file_pos_read(f.file); in SYSCALL_DEFINE3()
860 ret = vfs_readv(f.file, vec, vlen, &pos); in SYSCALL_DEFINE3()
862 file_pos_write(f.file, pos); in SYSCALL_DEFINE3()
863 fdput_pos(f); in SYSCALL_DEFINE3()
875 struct fd f = fdget_pos(fd); in SYSCALL_DEFINE3() local
878 if (f.file) { in SYSCALL_DEFINE3()
879 loff_t pos = file_pos_read(f.file); in SYSCALL_DEFINE3()
880 ret = vfs_writev(f.file, vec, vlen, &pos); in SYSCALL_DEFINE3()
882 file_pos_write(f.file, pos); in SYSCALL_DEFINE3()
883 fdput_pos(f); in SYSCALL_DEFINE3()
902 struct fd f; in SYSCALL_DEFINE5() local
908 f = fdget(fd); in SYSCALL_DEFINE5()
909 if (f.file) { in SYSCALL_DEFINE5()
911 if (f.file->f_mode & FMODE_PREAD) in SYSCALL_DEFINE5()
912 ret = vfs_readv(f.file, vec, vlen, &pos); in SYSCALL_DEFINE5()
913 fdput(f); in SYSCALL_DEFINE5()
926 struct fd f; in SYSCALL_DEFINE5() local
932 f = fdget(fd); in SYSCALL_DEFINE5()
933 if (f.file) { in SYSCALL_DEFINE5()
935 if (f.file->f_mode & FMODE_PWRITE) in SYSCALL_DEFINE5()
936 ret = vfs_writev(f.file, vec, vlen, &pos); in SYSCALL_DEFINE5()
937 fdput(f); in SYSCALL_DEFINE5()
1026 struct fd f = fdget_pos(fd); in COMPAT_SYSCALL_DEFINE3() local
1030 if (!f.file) in COMPAT_SYSCALL_DEFINE3()
1032 pos = f.file->f_pos; in COMPAT_SYSCALL_DEFINE3()
1033 ret = compat_readv(f.file, vec, vlen, &pos); in COMPAT_SYSCALL_DEFINE3()
1035 f.file->f_pos = pos; in COMPAT_SYSCALL_DEFINE3()
1036 fdput_pos(f); in COMPAT_SYSCALL_DEFINE3()
1044 struct fd f; in __compat_sys_preadv64() local
1049 f = fdget(fd); in __compat_sys_preadv64()
1050 if (!f.file) in __compat_sys_preadv64()
1053 if (f.file->f_mode & FMODE_PREAD) in __compat_sys_preadv64()
1054 ret = compat_readv(f.file, vec, vlen, &pos); in __compat_sys_preadv64()
1055 fdput(f); in __compat_sys_preadv64()
1103 struct fd f = fdget_pos(fd); in COMPAT_SYSCALL_DEFINE3() local
1107 if (!f.file) in COMPAT_SYSCALL_DEFINE3()
1109 pos = f.file->f_pos; in COMPAT_SYSCALL_DEFINE3()
1110 ret = compat_writev(f.file, vec, vlen, &pos); in COMPAT_SYSCALL_DEFINE3()
1112 f.file->f_pos = pos; in COMPAT_SYSCALL_DEFINE3()
1113 fdput_pos(f); in COMPAT_SYSCALL_DEFINE3()
1121 struct fd f; in __compat_sys_pwritev64() local
1126 f = fdget(fd); in __compat_sys_pwritev64()
1127 if (!f.file) in __compat_sys_pwritev64()
1130 if (f.file->f_mode & FMODE_PWRITE) in __compat_sys_pwritev64()
1131 ret = compat_writev(f.file, vec, vlen, &pos); in __compat_sys_pwritev64()
1132 fdput(f); in __compat_sys_pwritev64()