Lines Matching refs:cfile
351 struct file *cfile; /* Open file */ member
536 struct file *cfile; in ns_alloc_device() local
540 cfile = filp_open(cache_file, O_CREAT | O_RDWR | O_LARGEFILE, 0600); in ns_alloc_device()
541 if (IS_ERR(cfile)) in ns_alloc_device()
542 return PTR_ERR(cfile); in ns_alloc_device()
543 if (!(cfile->f_mode & FMODE_CAN_READ)) { in ns_alloc_device()
548 if (!(cfile->f_mode & FMODE_CAN_WRITE)) { in ns_alloc_device()
567 ns->cfile = cfile; in ns_alloc_device()
574 filp_close(cfile, NULL); in ns_alloc_device()
610 if (ns->cfile) { in ns_free_device()
613 filp_close(ns->cfile, NULL); in ns_free_device()
1432 if (ns->cfile) { in ns_read_page()
1445 tx = ns_read_file(ns, ns->cfile, ns->buf.byte, num, in ns_read_page()
1478 if (ns->cfile) { in ns_erase_sector()
1507 if (ns->cfile) { in ns_prog_page()
1520 tx = ns_read_file(ns, ns->cfile, pg_off, num, off); in ns_prog_page()
1530 tx = ns_write_file(ns, ns->cfile, ns->file_buf, in ns_prog_page()
1538 tx = ns_write_file(ns, ns->cfile, pg_off, num, off); in ns_prog_page()