Lines Matching refs:file
56 static loff_t gfs2_llseek(struct file *file, loff_t offset, int whence) in gfs2_llseek() argument
58 struct gfs2_inode *ip = GFS2_I(file->f_mapping->host); in gfs2_llseek()
69 error = generic_file_llseek(file, offset, whence); in gfs2_llseek()
75 error = generic_file_llseek(file, offset, whence); in gfs2_llseek()
92 static int gfs2_readdir(struct file *file, struct dir_context *ctx) in gfs2_readdir() argument
94 struct inode *dir = file->f_mapping->host; in gfs2_readdir()
103 error = gfs2_dir_read(dir, ctx, &file->f_ra); in gfs2_readdir()
152 static int gfs2_get_flags(struct file *filp, u32 __user *ptr) in gfs2_get_flags()
213 static int do_gfs2_set_flags(struct file *filp, u32 reqflags, u32 mask) in do_gfs2_set_flags()
291 static int gfs2_set_flags(struct file *filp, u32 __user *ptr) in gfs2_set_flags()
309 static long gfs2_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) in gfs2_ioctl()
334 static void gfs2_size_hint(struct file *filep, loff_t offset, size_t size) in gfs2_size_hint()
511 static int gfs2_mmap(struct file *file, struct vm_area_struct *vma) in gfs2_mmap() argument
513 struct gfs2_inode *ip = GFS2_I(file->f_mapping->host); in gfs2_mmap()
515 if (!(file->f_flags & O_NOATIME) && in gfs2_mmap()
526 file_accessed(file); in gfs2_mmap()
546 int gfs2_open_common(struct inode *inode, struct file *file) in gfs2_open_common() argument
552 ret = generic_file_open(inode, file); in gfs2_open_common()
563 gfs2_assert_warn(GFS2_SB(inode), !file->private_data); in gfs2_open_common()
564 file->private_data = fp; in gfs2_open_common()
582 static int gfs2_open(struct inode *inode, struct file *file) in gfs2_open() argument
597 error = gfs2_open_common(inode, file); in gfs2_open()
613 static int gfs2_release(struct inode *inode, struct file *file) in gfs2_release() argument
617 kfree(file->private_data); in gfs2_release()
618 file->private_data = NULL; in gfs2_release()
620 if (!(file->f_mode & FMODE_WRITE)) in gfs2_release()
648 static int gfs2_fsync(struct file *file, loff_t start, loff_t end, in gfs2_fsync() argument
651 struct address_space *mapping = file->f_mapping; in gfs2_fsync()
699 struct file *file = iocb->ki_filp; in gfs2_file_write_iter() local
700 struct gfs2_inode *ip = GFS2_I(file_inode(file)); in gfs2_file_write_iter()
707 gfs2_size_hint(file, iocb->ki_pos, iov_iter_count(from)); in gfs2_file_write_iter()
797 static long __gfs2_fallocate(struct file *file, int mode, loff_t offset, loff_t len) in __gfs2_fallocate() argument
799 struct inode *inode = file_inode(file); in __gfs2_fallocate()
824 gfs2_size_hint(file, offset, len); in __gfs2_fallocate()
897 file_update_time(file); in __gfs2_fallocate()
901 if ((file->f_flags & O_DSYNC) || IS_SYNC(file->f_mapping->host)) in __gfs2_fallocate()
902 return vfs_fsync_range(file, pos, pos + count - 1, in __gfs2_fallocate()
903 (file->f_flags & __O_SYNC) ? 0 : 1); in __gfs2_fallocate()
913 static long gfs2_fallocate(struct file *file, int mode, loff_t offset, loff_t len) in gfs2_fallocate() argument
915 struct inode *inode = file_inode(file); in gfs2_fallocate()
945 ret = __gfs2_fallocate(file, mode, offset, len); in gfs2_fallocate()
960 struct file *out, loff_t *ppos, in gfs2_file_splice_write()
986 static int gfs2_lock(struct file *file, int cmd, struct file_lock *fl) in gfs2_lock() argument
988 struct gfs2_inode *ip = GFS2_I(file->f_mapping->host); in gfs2_lock()
989 struct gfs2_sbd *sdp = GFS2_SB(file->f_mapping->host); in gfs2_lock()
1004 locks_lock_file_wait(file, fl); in gfs2_lock()
1008 return dlm_posix_get(ls->ls_dlm, ip->i_no_addr, file, fl); in gfs2_lock()
1010 return dlm_posix_unlock(ls->ls_dlm, ip->i_no_addr, file, fl); in gfs2_lock()
1012 return dlm_posix_lock(ls->ls_dlm, ip->i_no_addr, file, cmd, fl); in gfs2_lock()
1015 static int do_flock(struct file *file, int cmd, struct file_lock *fl) in do_flock() argument
1017 struct gfs2_file *fp = file->private_data; in do_flock()
1019 struct gfs2_inode *ip = GFS2_I(file_inode(file)); in do_flock()
1035 locks_lock_file_wait(file, in do_flock()
1063 error = locks_lock_file_wait(file, fl); in do_flock()
1072 static void do_unflock(struct file *file, struct file_lock *fl) in do_unflock() argument
1074 struct gfs2_file *fp = file->private_data; in do_unflock()
1078 locks_lock_file_wait(file, fl); in do_unflock()
1095 static int gfs2_flock(struct file *file, int cmd, struct file_lock *fl) in gfs2_flock() argument
1103 do_unflock(file, fl); in gfs2_flock()
1106 return do_flock(file, cmd, fl); in gfs2_flock()