Lines Matching refs:filp

64 nfs_file_open(struct inode *inode, struct file *filp)  in nfs_file_open()  argument
68 dprintk("NFS: open file(%pD2)\n", filp); in nfs_file_open()
71 res = nfs_check_flags(filp->f_flags); in nfs_file_open()
75 res = nfs_open(inode, filp); in nfs_file_open()
80 nfs_file_release(struct inode *inode, struct file *filp) in nfs_file_release() argument
82 dprintk("NFS: release(%pD2)\n", filp); in nfs_file_release()
85 nfs_file_clear_open_context(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()
538 struct file *filp = vmf->vma->vm_file; in nfs_vm_page_mkwrite() local
539 struct inode *inode = file_inode(filp); in nfs_vm_page_mkwrite()
545 filp, filp->f_mapping->host->i_ino, in nfs_vm_page_mkwrite()
568 if (nfs_flush_incompatible(filp, page) == 0 && in nfs_vm_page_mkwrite()
569 nfs_updatepage(filp, page, 0, pagelen) == 0) in nfs_vm_page_mkwrite()
586 static int nfs_need_check_write(struct file *filp, struct inode *inode) in nfs_need_check_write() argument
590 ctx = nfs_file_open_context(filp); in nfs_need_check_write()
661 do_getlk(struct file *filp, int cmd, struct file_lock *fl, int is_local) in do_getlk() argument
663 struct inode *inode = filp->f_mapping->host; in do_getlk()
668 posix_test_lock(filp, fl); in do_getlk()
681 status = NFS_PROTO(inode)->lock(filp, cmd, fl); in do_getlk()
690 do_unlk(struct file *filp, int cmd, struct file_lock *fl, int is_local) in do_unlk() argument
692 struct inode *inode = filp->f_mapping->host; in do_unlk()
700 vfs_fsync(filp, 0); in do_unlk()
702 l_ctx = nfs_get_lock_context(nfs_file_open_context(filp)); in do_unlk()
719 status = NFS_PROTO(inode)->lock(filp, cmd, fl); in do_unlk()
721 status = locks_lock_file_wait(filp, fl); in do_unlk()
726 do_setlk(struct file *filp, int cmd, struct file_lock *fl, int is_local) in do_setlk() argument
728 struct inode *inode = filp->f_mapping->host; in do_setlk()
735 status = nfs_sync_mapping(filp->f_mapping); in do_setlk()
744 status = NFS_PROTO(inode)->lock(filp, cmd, fl); in do_setlk()
746 status = locks_lock_file_wait(filp, fl); in do_setlk()
757 nfs_sync_mapping(filp->f_mapping); in do_setlk()
760 if (mapping_mapped(filp->f_mapping)) in do_setlk()
761 nfs_revalidate_mapping(inode, filp->f_mapping); in do_setlk()
770 int nfs_lock(struct file *filp, int cmd, struct file_lock *fl) in nfs_lock() argument
772 struct inode *inode = filp->f_mapping->host; in nfs_lock()
777 filp, fl->fl_type, fl->fl_flags, in nfs_lock()
796 ret = do_getlk(filp, cmd, fl, is_local); in nfs_lock()
798 ret = do_unlk(filp, cmd, fl, is_local); in nfs_lock()
800 ret = do_setlk(filp, cmd, fl, is_local); in nfs_lock()
809 int nfs_flock(struct file *filp, int cmd, struct file_lock *fl) in nfs_flock() argument
811 struct inode *inode = filp->f_mapping->host; in nfs_flock()
815 filp, fl->fl_type, fl->fl_flags); in nfs_flock()
834 return do_unlk(filp, cmd, fl, is_local); in nfs_flock()
835 return do_setlk(filp, cmd, fl, is_local); in nfs_flock()