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()
567 struct fd f = fdget_pos(fd); in SYSCALL_DEFINE3() local
570 if (f.file) { in SYSCALL_DEFINE3()
571 loff_t pos = file_pos_read(f.file); in SYSCALL_DEFINE3()
572 ret = vfs_read(f.file, buf, count, &pos); in SYSCALL_DEFINE3()
574 file_pos_write(f.file, pos); in SYSCALL_DEFINE3()
575 fdput_pos(f); in SYSCALL_DEFINE3()
583 struct fd f = fdget_pos(fd); in SYSCALL_DEFINE3() local
586 if (f.file) { in SYSCALL_DEFINE3()
587 loff_t pos = file_pos_read(f.file); in SYSCALL_DEFINE3()
588 ret = vfs_write(f.file, buf, count, &pos); in SYSCALL_DEFINE3()
590 file_pos_write(f.file, pos); in SYSCALL_DEFINE3()
591 fdput_pos(f); in SYSCALL_DEFINE3()
600 struct fd f; in SYSCALL_DEFINE4() local
606 f = fdget(fd); in SYSCALL_DEFINE4()
607 if (f.file) { in SYSCALL_DEFINE4()
609 if (f.file->f_mode & FMODE_PREAD) in SYSCALL_DEFINE4()
610 ret = vfs_read(f.file, buf, count, &pos); in SYSCALL_DEFINE4()
611 fdput(f); in SYSCALL_DEFINE4()
620 struct fd f; in SYSCALL_DEFINE4() local
626 f = fdget(fd); in SYSCALL_DEFINE4()
627 if (f.file) { in SYSCALL_DEFINE4()
629 if (f.file->f_mode & FMODE_PWRITE) in SYSCALL_DEFINE4()
630 ret = vfs_write(f.file, buf, count, &pos); in SYSCALL_DEFINE4()
631 fdput(f); in SYSCALL_DEFINE4()
858 struct fd f = fdget_pos(fd); in SYSCALL_DEFINE3() local
861 if (f.file) { in SYSCALL_DEFINE3()
862 loff_t pos = file_pos_read(f.file); in SYSCALL_DEFINE3()
863 ret = vfs_readv(f.file, vec, vlen, &pos); in SYSCALL_DEFINE3()
865 file_pos_write(f.file, pos); in SYSCALL_DEFINE3()
866 fdput_pos(f); in SYSCALL_DEFINE3()
878 struct fd f = fdget_pos(fd); in SYSCALL_DEFINE3() local
881 if (f.file) { in SYSCALL_DEFINE3()
882 loff_t pos = file_pos_read(f.file); in SYSCALL_DEFINE3()
883 ret = vfs_writev(f.file, vec, vlen, &pos); in SYSCALL_DEFINE3()
885 file_pos_write(f.file, pos); in SYSCALL_DEFINE3()
886 fdput_pos(f); in SYSCALL_DEFINE3()
905 struct fd f; in SYSCALL_DEFINE5() local
911 f = fdget(fd); in SYSCALL_DEFINE5()
912 if (f.file) { in SYSCALL_DEFINE5()
914 if (f.file->f_mode & FMODE_PREAD) in SYSCALL_DEFINE5()
915 ret = vfs_readv(f.file, vec, vlen, &pos); in SYSCALL_DEFINE5()
916 fdput(f); in SYSCALL_DEFINE5()
929 struct fd f; in SYSCALL_DEFINE5() local
935 f = fdget(fd); in SYSCALL_DEFINE5()
936 if (f.file) { in SYSCALL_DEFINE5()
938 if (f.file->f_mode & FMODE_PWRITE) in SYSCALL_DEFINE5()
939 ret = vfs_writev(f.file, vec, vlen, &pos); in SYSCALL_DEFINE5()
940 fdput(f); in SYSCALL_DEFINE5()
1029 struct fd f = fdget_pos(fd); in COMPAT_SYSCALL_DEFINE3() local
1033 if (!f.file) in COMPAT_SYSCALL_DEFINE3()
1035 pos = f.file->f_pos; in COMPAT_SYSCALL_DEFINE3()
1036 ret = compat_readv(f.file, vec, vlen, &pos); in COMPAT_SYSCALL_DEFINE3()
1038 f.file->f_pos = pos; in COMPAT_SYSCALL_DEFINE3()
1039 fdput_pos(f); in COMPAT_SYSCALL_DEFINE3()
1047 struct fd f; in __compat_sys_preadv64() local
1052 f = fdget(fd); in __compat_sys_preadv64()
1053 if (!f.file) in __compat_sys_preadv64()
1056 if (f.file->f_mode & FMODE_PREAD) in __compat_sys_preadv64()
1057 ret = compat_readv(f.file, vec, vlen, &pos); in __compat_sys_preadv64()
1058 fdput(f); in __compat_sys_preadv64()
1106 struct fd f = fdget_pos(fd); in COMPAT_SYSCALL_DEFINE3() local
1110 if (!f.file) in COMPAT_SYSCALL_DEFINE3()
1112 pos = f.file->f_pos; in COMPAT_SYSCALL_DEFINE3()
1113 ret = compat_writev(f.file, vec, vlen, &pos); in COMPAT_SYSCALL_DEFINE3()
1115 f.file->f_pos = pos; in COMPAT_SYSCALL_DEFINE3()
1116 fdput_pos(f); in COMPAT_SYSCALL_DEFINE3()
1124 struct fd f; in __compat_sys_pwritev64() local
1129 f = fdget(fd); in __compat_sys_pwritev64()
1130 if (!f.file) in __compat_sys_pwritev64()
1133 if (f.file->f_mode & FMODE_PWRITE) in __compat_sys_pwritev64()
1134 ret = compat_writev(f.file, vec, vlen, &pos); in __compat_sys_pwritev64()
1135 fdput(f); in __compat_sys_pwritev64()