Lines Matching refs:real
109 static int ovl_real_fdget_meta(const struct file *file, struct fd *real, in ovl_real_fdget_meta() argument
115 real->flags = 0; in ovl_real_fdget_meta()
116 real->file = file->private_data; in ovl_real_fdget_meta()
124 if (unlikely(file_inode(real->file) != realinode)) { in ovl_real_fdget_meta()
125 real->flags = FDPUT_FPUT; in ovl_real_fdget_meta()
126 real->file = ovl_open_realfile(file, realinode); in ovl_real_fdget_meta()
128 return PTR_ERR_OR_ZERO(real->file); in ovl_real_fdget_meta()
132 if (unlikely((file->f_flags ^ real->file->f_flags) & ~OVL_OPEN_FLAGS)) in ovl_real_fdget_meta()
133 return ovl_change_flags(real->file, file->f_flags); in ovl_real_fdget_meta()
138 static int ovl_real_fdget(const struct file *file, struct fd *real) in ovl_real_fdget() argument
141 real->flags = 0; in ovl_real_fdget()
142 real->file = ovl_dir_real_file(file, false); in ovl_real_fdget()
144 return PTR_ERR_OR_ZERO(real->file); in ovl_real_fdget()
147 return ovl_real_fdget_meta(file, real, false); in ovl_real_fdget()
181 struct fd real; in ovl_llseek() local
197 ret = ovl_real_fdget(file, &real); in ovl_llseek()
209 real.file->f_pos = file->f_pos; in ovl_llseek()
212 ret = vfs_llseek(real.file, offset, whence); in ovl_llseek()
215 file->f_pos = real.file->f_pos; in ovl_llseek()
218 fdput(real); in ovl_llseek()
301 struct fd real; in ovl_read_iter() local
308 ret = ovl_real_fdget(file, &real); in ovl_read_iter()
314 (!real.file->f_mapping->a_ops || in ovl_read_iter()
315 !real.file->f_mapping->a_ops->direct_IO)) in ovl_read_iter()
320 ret = vfs_iter_read(real.file, iter, &iocb->ki_pos, in ovl_read_iter()
330 aio_req->fd = real; in ovl_read_iter()
331 real.flags = 0; in ovl_read_iter()
333 kiocb_clone(&aio_req->iocb, iocb, real.file); in ovl_read_iter()
336 ret = vfs_iocb_iter_read(real.file, &aio_req->iocb, iter); in ovl_read_iter()
345 fdput(real); in ovl_read_iter()
354 struct fd real; in ovl_write_iter() local
369 ret = ovl_real_fdget(file, &real); in ovl_write_iter()
375 (!real.file->f_mapping->a_ops || in ovl_write_iter()
376 !real.file->f_mapping->a_ops->direct_IO)) in ovl_write_iter()
384 file_start_write(real.file); in ovl_write_iter()
385 ret = vfs_iter_write(real.file, iter, &iocb->ki_pos, in ovl_write_iter()
387 file_end_write(real.file); in ovl_write_iter()
398 file_start_write(real.file); in ovl_write_iter()
400 __sb_writers_release(file_inode(real.file)->i_sb, in ovl_write_iter()
402 aio_req->fd = real; in ovl_write_iter()
403 real.flags = 0; in ovl_write_iter()
405 kiocb_clone(&aio_req->iocb, iocb, real.file); in ovl_write_iter()
409 ret = vfs_iocb_iter_write(real.file, &aio_req->iocb, iter); in ovl_write_iter()
417 fdput(real); in ovl_write_iter()
436 struct fd real; in ovl_splice_write() local
449 ret = ovl_real_fdget(out, &real); in ovl_splice_write()
454 file_start_write(real.file); in ovl_splice_write()
456 ret = iter_file_splice_write(pipe, real.file, ppos, len, flags); in ovl_splice_write()
458 file_end_write(real.file); in ovl_splice_write()
462 fdput(real); in ovl_splice_write()
472 struct fd real; in ovl_fsync() local
480 ret = ovl_real_fdget_meta(file, &real, !datasync); in ovl_fsync()
485 if (file_inode(real.file) == ovl_inode_upper(file_inode(file))) { in ovl_fsync()
487 ret = vfs_fsync_range(real.file, start, end, datasync); in ovl_fsync()
491 fdput(real); in ovl_fsync()
530 struct fd real; in ovl_fallocate() local
534 ret = ovl_real_fdget(file, &real); in ovl_fallocate()
539 ret = vfs_fallocate(real.file, mode, offset, len); in ovl_fallocate()
545 fdput(real); in ovl_fallocate()
552 struct fd real; in ovl_fadvise() local
556 ret = ovl_real_fdget(file, &real); in ovl_fadvise()
561 ret = vfs_fadvise(real.file, offset, len, advice); in ovl_fadvise()
564 fdput(real); in ovl_fadvise()
572 struct fd real; in ovl_real_ioctl() local
575 ret = ovl_real_fdget(file, &real); in ovl_real_ioctl()
579 ret = security_file_ioctl(real.file, cmd, arg); in ovl_real_ioctl()
585 ret = vfs_ioctl(real.file, cmd, arg); in ovl_real_ioctl()
588 fdput(real); in ovl_real_ioctl()