Lines Matching refs:filp
61 nfs_file_open(struct inode *inode, struct file *filp) in nfs_file_open() argument
65 dprintk("NFS: open file(%pD2)\n", filp); in nfs_file_open()
68 res = nfs_check_flags(filp->f_flags); in nfs_file_open()
72 res = nfs_open(inode, filp); in nfs_file_open()
74 filp->f_mode |= FMODE_CAN_ODIRECT; in nfs_file_open()
79 nfs_file_release(struct inode *inode, struct file *filp) in nfs_file_release() argument
81 dprintk("NFS: release(%pD2)\n", filp); in nfs_file_release()
84 nfs_file_clear_open_context(filp); in nfs_file_release()
85 nfs_fscache_release_file(inode, filp); in nfs_file_release()
101 static int nfs_revalidate_file_size(struct inode *inode, struct file *filp) in nfs_revalidate_file_size() argument
105 if (filp->f_flags & O_DIRECT) in nfs_revalidate_file_size()
114 loff_t nfs_file_llseek(struct file *filp, loff_t offset, int whence) in nfs_file_llseek() argument
117 filp, offset, whence); in nfs_file_llseek()
124 struct inode *inode = filp->f_mapping->host; in nfs_file_llseek()
126 int retval = nfs_revalidate_file_size(inode, filp); in nfs_file_llseek()
131 return generic_file_llseek(filp, offset, whence); in nfs_file_llseek()
583 struct file *filp = vmf->vma->vm_file; in nfs_vm_page_mkwrite() local
584 struct inode *inode = file_inode(filp); in nfs_vm_page_mkwrite()
591 filp, filp->f_mapping->host->i_ino, in nfs_vm_page_mkwrite()
619 if (nfs_flush_incompatible(filp, folio) == 0 && in nfs_vm_page_mkwrite()
620 nfs_update_folio(filp, folio, 0, pagelen) == 0) in nfs_vm_page_mkwrite()
720 do_getlk(struct file *filp, int cmd, struct file_lock *fl, int is_local) in do_getlk() argument
722 struct inode *inode = filp->f_mapping->host; in do_getlk()
727 posix_test_lock(filp, fl); in do_getlk()
740 status = NFS_PROTO(inode)->lock(filp, cmd, fl); in do_getlk()
749 do_unlk(struct file *filp, int cmd, struct file_lock *fl, int is_local) in do_unlk() argument
751 struct inode *inode = filp->f_mapping->host; in do_unlk()
761 l_ctx = nfs_get_lock_context(nfs_file_open_context(filp)); in do_unlk()
778 status = NFS_PROTO(inode)->lock(filp, cmd, fl); in do_unlk()
780 status = locks_lock_file_wait(filp, fl); in do_unlk()
785 do_setlk(struct file *filp, int cmd, struct file_lock *fl, int is_local) in do_setlk() argument
787 struct inode *inode = filp->f_mapping->host; in do_setlk()
794 status = nfs_sync_mapping(filp->f_mapping); in do_setlk()
803 status = NFS_PROTO(inode)->lock(filp, cmd, fl); in do_setlk()
805 status = locks_lock_file_wait(filp, fl); in do_setlk()
816 nfs_sync_mapping(filp->f_mapping); in do_setlk()
819 if (mapping_mapped(filp->f_mapping)) in do_setlk()
820 nfs_revalidate_mapping(inode, filp->f_mapping); in do_setlk()
829 int nfs_lock(struct file *filp, int cmd, struct file_lock *fl) in nfs_lock() argument
831 struct inode *inode = filp->f_mapping->host; in nfs_lock()
836 filp, fl->fl_type, fl->fl_flags, in nfs_lock()
854 ret = do_getlk(filp, cmd, fl, is_local); in nfs_lock()
856 ret = do_unlk(filp, cmd, fl, is_local); in nfs_lock()
858 ret = do_setlk(filp, cmd, fl, is_local); in nfs_lock()
867 int nfs_flock(struct file *filp, int cmd, struct file_lock *fl) in nfs_flock() argument
869 struct inode *inode = filp->f_mapping->host; in nfs_flock()
873 filp, fl->fl_type, fl->fl_flags); in nfs_flock()
883 return do_unlk(filp, cmd, fl, is_local); in nfs_flock()
884 return do_setlk(filp, cmd, fl, is_local); in nfs_flock()