• Home
  • Raw
  • Download

Lines Matching refs:filep

145 void file_hold(struct file *filep)  in file_hold()  argument
154 if (filep != NULL) in file_hold()
156 assert(filep->f_refcount > 0); in file_hold()
157 filep->f_refcount++; in file_hold()
162 void file_release(struct file *filep) in file_release() argument
171 if (filep != NULL) in file_release()
173 assert(filep->f_refcount > 0); in file_release()
174 filep->f_refcount--; in file_release()
190 static int _files_close(struct file *filep) in _files_close() argument
192 struct Vnode *vnode = filep->f_vnode; in _files_close()
196 if (filep->f_oflags & O_DIRECTORY) in _files_close()
198 ret = closedir(filep->f_dir); in _files_close()
207 if (filep->ops && filep->ops->close) in _files_close()
211 ret = filep->ops->close(filep); in _files_close()
225 PRINTK("Removing bchar device %s failed\n", filep->f_path); in _files_close()
233 memset(filep, 0, sizeof(struct file)); in _files_close()
234 filep->fd = -1; in _files_close()
428 struct file *filep = NULL; in files_allocate() local
448 filep = &list->fl_files[i]; in files_allocate()
449 filep->f_oflags = oflags; in files_allocate()
450 filep->f_pos = pos; in files_allocate()
451 filep->f_vnode = (struct Vnode *)vnode_ptr; in files_allocate()
452 filep->f_priv = (void *)priv; in files_allocate()
453 filep->f_refcount = 1; in files_allocate()
454 filep->f_mapping = (struct page_mapping *)&vnode_ptr->mapping; in files_allocate()
455 filep->f_dir = NULL; in files_allocate()
456 filep->f_path = vnode_ptr->filePath; in files_allocate()
457 filep->fd = i; in files_allocate()
458 filep->ops = vnode_ptr->fop; in files_allocate()
460 return filep; in files_allocate()
555 struct file *filep = &list->fl_files[fd]; in files_release() local
557 memset(filep, 0, sizeof(struct file)); in files_release()
558 filep->fd = -1; in files_release()
648 struct file *filep = NULL; in files_refer() local
657 (void)fs_getfilep(fd, &filep); in files_refer()
658 if (filep != NULL) in files_refer()
660 filep->f_refcount++; in files_refer()