Lines Matching refs:cfile
367 struct file *cfile; /* Open file */ member
574 struct file *cfile; in alloc_device() local
578 cfile = filp_open(cache_file, O_CREAT | O_RDWR | O_LARGEFILE, 0600); in alloc_device()
579 if (IS_ERR(cfile)) in alloc_device()
580 return PTR_ERR(cfile); in alloc_device()
581 if (!(cfile->f_mode & FMODE_CAN_READ)) { in alloc_device()
586 if (!(cfile->f_mode & FMODE_CAN_WRITE)) { in alloc_device()
604 ns->cfile = cfile; in alloc_device()
628 filp_close(cfile, NULL); in alloc_device()
639 if (ns->cfile) { in free_device()
642 filp_close(ns->cfile, NULL); in free_device()
1472 if (ns->cfile) { in read_page()
1485 tx = read_file(ns, ns->cfile, ns->buf.byte, num, pos); in read_page()
1517 if (ns->cfile) { in erase_sector()
1546 if (ns->cfile) { in prog_page()
1559 tx = read_file(ns, ns->cfile, pg_off, num, off); in prog_page()
1569 tx = write_file(ns, ns->cfile, ns->file_buf, ns->geom.pgszoob, pos); in prog_page()
1576 tx = write_file(ns, ns->cfile, pg_off, num, off); in prog_page()