Lines Matching refs:filp
65 nfs_file_open(struct inode *inode, struct file *filp)
69 dprintk("NFS: open file(%pD2)\n", filp);
72 res = nfs_check_flags(filp->f_flags);
76 res = nfs_open(inode, filp);
81 nfs_file_release(struct inode *inode, struct file *filp)
83 dprintk("NFS: release(%pD2)\n", filp);
86 nfs_file_clear_open_context(filp);
94 * @filp: pointer to struct file
102 static int nfs_revalidate_file_size(struct inode *inode, struct file *filp)
106 if (filp->f_flags & O_DIRECT)
115 loff_t nfs_file_llseek(struct file *filp, loff_t offset, int whence)
118 filp, offset, whence);
125 struct inode *inode = filp->f_mapping->host;
127 int retval = nfs_revalidate_file_size(inode, filp);
132 return generic_file_llseek(filp, offset, whence);
552 struct file *filp = vmf->vma->vm_file;
553 struct inode *inode = file_inode(filp);
559 filp, filp->f_mapping->host->i_ino,
582 if (nfs_flush_incompatible(filp, page) == 0 &&
583 nfs_updatepage(filp, page, 0, pagelen) == 0)
600 static int nfs_need_check_write(struct file *filp, struct inode *inode,
605 ctx = nfs_file_open_context(filp);
680 do_getlk(struct file *filp, int cmd, struct file_lock *fl, int is_local)
682 struct inode *inode = filp->f_mapping->host;
687 posix_test_lock(filp, fl);
700 status = NFS_PROTO(inode)->lock(filp, cmd, fl);
709 do_unlk(struct file *filp, int cmd, struct file_lock *fl, int is_local)
711 struct inode *inode = filp->f_mapping->host;
721 l_ctx = nfs_get_lock_context(nfs_file_open_context(filp));
738 status = NFS_PROTO(inode)->lock(filp, cmd, fl);
740 status = locks_lock_file_wait(filp, fl);
745 do_setlk(struct file *filp, int cmd, struct file_lock *fl, int is_local)
747 struct inode *inode = filp->f_mapping->host;
754 status = nfs_sync_mapping(filp->f_mapping);
763 status = NFS_PROTO(inode)->lock(filp, cmd, fl);
765 status = locks_lock_file_wait(filp, fl);
776 nfs_sync_mapping(filp->f_mapping);
779 if (mapping_mapped(filp->f_mapping))
780 nfs_revalidate_mapping(inode, filp->f_mapping);
789 int nfs_lock(struct file *filp, int cmd, struct file_lock *fl)
791 struct inode *inode = filp->f_mapping->host;
796 filp, fl->fl_type, fl->fl_flags,
815 ret = do_getlk(filp, cmd, fl, is_local);
817 ret = do_unlk(filp, cmd, fl, is_local);
819 ret = do_setlk(filp, cmd, fl, is_local);
828 int nfs_flock(struct file *filp, int cmd, struct file_lock *fl)
830 struct inode *inode = filp->f_mapping->host;
834 filp, fl->fl_type, fl->fl_flags);
853 return do_unlk(filp, cmd, fl, is_local);
854 return do_setlk(filp, cmd, fl, is_local);