Lines Matching refs:cfile
353 struct file *cfile; /* Open file */ member
538 struct file *cfile; in ns_alloc_device() local
542 cfile = filp_open(cache_file, O_CREAT | O_RDWR | O_LARGEFILE, 0600); in ns_alloc_device()
543 if (IS_ERR(cfile)) in ns_alloc_device()
544 return PTR_ERR(cfile); in ns_alloc_device()
545 if (!(cfile->f_mode & FMODE_CAN_READ)) { in ns_alloc_device()
550 if (!(cfile->f_mode & FMODE_CAN_WRITE)) { in ns_alloc_device()
569 ns->cfile = cfile; in ns_alloc_device()
576 filp_close(cfile, NULL); in ns_alloc_device()
612 if (ns->cfile) { in ns_free_device()
615 filp_close(ns->cfile, NULL); in ns_free_device()
1427 if (ns->cfile) { in ns_read_page()
1440 tx = ns_read_file(ns, ns->cfile, ns->buf.byte, num, in ns_read_page()
1473 if (ns->cfile) { in ns_erase_sector()
1502 if (ns->cfile) { in ns_prog_page()
1515 tx = ns_read_file(ns, ns->cfile, pg_off, num, off); in ns_prog_page()
1525 tx = ns_write_file(ns, ns->cfile, ns->file_buf, in ns_prog_page()
1533 tx = ns_write_file(ns, ns->cfile, pg_off, num, off); in ns_prog_page()