Lines Matching refs:filp

44 long vfs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)  in vfs_ioctl()  argument
48 if (!filp->f_op->unlocked_ioctl) in vfs_ioctl()
51 error = filp->f_op->unlocked_ioctl(filp, cmd, arg); in vfs_ioctl()
59 static int ioctl_fibmap(struct file *filp, int __user *p) in ioctl_fibmap() argument
61 struct inode *inode = file_inode(filp); in ioctl_fibmap()
83 sb->s_id, filp); in ioctl_fibmap()
200 static int ioctl_fiemap(struct file *filp, struct fiemap __user *ufiemap) in ioctl_fiemap() argument
204 struct inode *inode = file_inode(filp); in ioctl_fiemap()
270 static int ioctl_preallocate(struct file *filp, int mode, void __user *argp) in ioctl_preallocate() argument
272 struct inode *inode = file_inode(filp); in ioctl_preallocate()
282 sr.l_start += filp->f_pos; in ioctl_preallocate()
291 return vfs_fallocate(filp, mode | FALLOC_FL_KEEP_SIZE, sr.l_start, in ioctl_preallocate()
324 static int file_ioctl(struct file *filp, unsigned int cmd, int __user *p) in file_ioctl() argument
328 return ioctl_fibmap(filp, p); in file_ioctl()
331 return ioctl_preallocate(filp, 0, p); in file_ioctl()
334 return ioctl_preallocate(filp, FALLOC_FL_PUNCH_HOLE, p); in file_ioctl()
336 return ioctl_preallocate(filp, FALLOC_FL_ZERO_RANGE, p); in file_ioctl()
342 static int ioctl_fionbio(struct file *filp, int __user *argp) in ioctl_fionbio() argument
356 spin_lock(&filp->f_lock); in ioctl_fionbio()
358 filp->f_flags |= flag; in ioctl_fionbio()
360 filp->f_flags &= ~flag; in ioctl_fionbio()
361 spin_unlock(&filp->f_lock); in ioctl_fionbio()
365 static int ioctl_fioasync(unsigned int fd, struct file *filp, in ioctl_fioasync() argument
377 if ((flag ^ filp->f_flags) & FASYNC) { in ioctl_fioasync()
378 if (filp->f_op->fasync) in ioctl_fioasync()
380 error = filp->f_op->fasync(fd, filp, on); in ioctl_fioasync()
387 static int ioctl_fsfreeze(struct file *filp) in ioctl_fsfreeze() argument
389 struct super_block *sb = file_inode(filp)->i_sb; in ioctl_fsfreeze()
404 static int ioctl_fsthaw(struct file *filp) in ioctl_fsthaw() argument
406 struct super_block *sb = file_inode(filp)->i_sb; in ioctl_fsthaw()
773 static int do_vfs_ioctl(struct file *filp, unsigned int fd, in do_vfs_ioctl() argument
777 struct inode *inode = file_inode(filp); in do_vfs_ioctl()
789 return ioctl_fionbio(filp, argp); in do_vfs_ioctl()
792 return ioctl_fioasync(fd, filp, argp); in do_vfs_ioctl()
805 return ioctl_fsfreeze(filp); in do_vfs_ioctl()
808 return ioctl_fsthaw(filp); in do_vfs_ioctl()
811 return ioctl_fiemap(filp, argp); in do_vfs_ioctl()
821 return ioctl_file_clone(filp, arg, 0, 0, 0); in do_vfs_ioctl()
824 return ioctl_file_clone_range(filp, argp); in do_vfs_ioctl()
827 return ioctl_file_dedupe_range(filp, argp); in do_vfs_ioctl()
831 return vfs_ioctl(filp, cmd, arg); in do_vfs_ioctl()
833 return put_user(i_size_read(inode) - filp->f_pos, in do_vfs_ioctl()
837 return ioctl_getflags(filp, argp); in do_vfs_ioctl()
840 return ioctl_setflags(filp, argp); in do_vfs_ioctl()
843 return ioctl_fsgetxattr(filp, argp); in do_vfs_ioctl()
846 return ioctl_fssetxattr(filp, argp); in do_vfs_ioctl()
850 return file_ioctl(filp, cmd, argp); in do_vfs_ioctl()