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