Lines Matching refs:real

104 static int ovl_real_fdget_meta(const struct file *file, struct fd *real,  in ovl_real_fdget_meta()  argument
111 real->flags = 0; in ovl_real_fdget_meta()
112 real->file = file->private_data; in ovl_real_fdget_meta()
128 if (unlikely(file_inode(real->file) != d_inode(realpath.dentry))) { in ovl_real_fdget_meta()
129 real->flags = FDPUT_FPUT; in ovl_real_fdget_meta()
130 real->file = ovl_open_realfile(file, &realpath); in ovl_real_fdget_meta()
132 return PTR_ERR_OR_ZERO(real->file); in ovl_real_fdget_meta()
136 if (unlikely((file->f_flags ^ real->file->f_flags) & ~OVL_OPEN_FLAGS)) in ovl_real_fdget_meta()
137 return ovl_change_flags(real->file, file->f_flags); in ovl_real_fdget_meta()
142 static int ovl_real_fdget(const struct file *file, struct fd *real) in ovl_real_fdget() argument
145 real->flags = 0; in ovl_real_fdget()
146 real->file = ovl_dir_real_file(file, false); in ovl_real_fdget()
148 return PTR_ERR_OR_ZERO(real->file); in ovl_real_fdget()
151 return ovl_real_fdget_meta(file, real, false); in ovl_real_fdget()
196 struct fd real; in ovl_llseek() local
212 ret = ovl_real_fdget(file, &real); in ovl_llseek()
224 real.file->f_pos = file->f_pos; in ovl_llseek()
227 ret = vfs_llseek(real.file, offset, whence); in ovl_llseek()
230 file->f_pos = real.file->f_pos; in ovl_llseek()
233 fdput(real); in ovl_llseek()
316 struct fd real; in ovl_read_iter() local
323 ret = ovl_real_fdget(file, &real); in ovl_read_iter()
329 !(real.file->f_mode & FMODE_CAN_ODIRECT)) in ovl_read_iter()
334 ret = vfs_iter_read(real.file, iter, &iocb->ki_pos, in ovl_read_iter()
345 kiocb_clone(&aio_req->iocb, iocb, get_file(real.file)); in ovl_read_iter()
348 ret = vfs_iocb_iter_read(real.file, &aio_req->iocb, iter); in ovl_read_iter()
357 fdput(real); in ovl_read_iter()
366 struct fd real; in ovl_write_iter() local
381 ret = ovl_real_fdget(file, &real); in ovl_write_iter()
387 !(real.file->f_mode & FMODE_CAN_ODIRECT)) in ovl_write_iter()
401 file_start_write(real.file); in ovl_write_iter()
402 ret = vfs_iter_write(real.file, iter, &iocb->ki_pos, in ovl_write_iter()
404 file_end_write(real.file); in ovl_write_iter()
416 kiocb_clone(&aio_req->iocb, iocb, get_file(real.file)); in ovl_write_iter()
421 ret = vfs_iocb_iter_write(real.file, &aio_req->iocb, iter); in ovl_write_iter()
429 fdput(real); in ovl_write_iter()
442 struct fd real; in ovl_splice_read() local
445 ret = ovl_real_fdget(in, &real); in ovl_splice_read()
450 ret = vfs_splice_read(real.file, ppos, pipe, len, flags); in ovl_splice_read()
454 fdput(real); in ovl_splice_read()
469 struct fd real; in ovl_splice_write() local
481 ret = ovl_real_fdget(out, &real); in ovl_splice_write()
486 file_start_write(real.file); in ovl_splice_write()
488 ret = iter_file_splice_write(pipe, real.file, ppos, len, flags); in ovl_splice_write()
490 file_end_write(real.file); in ovl_splice_write()
494 fdput(real); in ovl_splice_write()
504 struct fd real; in ovl_fsync() local
512 ret = ovl_real_fdget_meta(file, &real, !datasync); in ovl_fsync()
517 if (file_inode(real.file) == ovl_inode_upper(file_inode(file))) { in ovl_fsync()
519 ret = vfs_fsync_range(real.file, start, end, datasync); in ovl_fsync()
523 fdput(real); in ovl_fsync()
553 struct fd real; in ovl_fallocate() local
564 ret = ovl_real_fdget(file, &real); in ovl_fallocate()
569 ret = vfs_fallocate(real.file, mode, offset, len); in ovl_fallocate()
575 fdput(real); in ovl_fallocate()
585 struct fd real; in ovl_fadvise() local
589 ret = ovl_real_fdget(file, &real); in ovl_fadvise()
594 ret = vfs_fadvise(real.file, offset, len, advice); in ovl_fadvise()
597 fdput(real); in ovl_fadvise()
705 struct fd real; in ovl_flush() local
709 err = ovl_real_fdget(file, &real); in ovl_flush()
713 if (real.file->f_op->flush) { in ovl_flush()
715 err = real.file->f_op->flush(real.file, id); in ovl_flush()
718 fdput(real); in ovl_flush()