• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/fs/ncpfs/

Lines Matching defs:ctl

410 	struct ncp_cache_control ctl;
416 ctl.page = NULL;
417 ctl.cache = NULL;
443 ctl.cache = cache = kmap(page);
444 ctl.head = cache->head;
446 if (!PageUptodate(page) || !ctl.head.eof)
450 if (jiffies - ctl.head.time >= NCP_MAX_AGE(server))
455 if ((!mtime) || (mtime != ctl.head.mtime))
459 if (filp->f_pos > ctl.head.end)
462 ctl.fpos = filp->f_pos + (NCP_DIRCACHE_START - 2);
463 ctl.ofs = ctl.fpos / NCP_DIRCACHE_SIZE;
464 ctl.idx = ctl.fpos % NCP_DIRCACHE_SIZE;
467 if (ctl.ofs != 0) {
468 ctl.page = find_lock_page(&inode->i_data, ctl.ofs);
469 if (!ctl.page)
471 ctl.cache = kmap(ctl.page);
472 if (!PageUptodate(ctl.page))
475 while (ctl.idx < NCP_DIRCACHE_SIZE) {
479 dent = ncp_dget_fpos(ctl.cache->dentry[ctl.idx],
490 ctl.idx += 1;
491 if (filp->f_pos > ctl.head.end)
494 if (ctl.page) {
495 kunmap(ctl.page);
496 SetPageUptodate(ctl.page);
497 unlock_page(ctl.page);
498 page_cache_release(ctl.page);
499 ctl.page = NULL;
501 ctl.idx = 0;
502 ctl.ofs += 1;
505 if (ctl.page) {
506 kunmap(ctl.page);
507 unlock_page(ctl.page);
508 page_cache_release(ctl.page);
509 ctl.page = NULL;
511 ctl.cache = cache;
518 ctl.head.mtime = mtime;
519 ctl.head.time = jiffies;
520 ctl.head.eof = 0;
521 ctl.fpos = 2;
522 ctl.ofs = 0;
523 ctl.idx = NCP_DIRCACHE_START;
524 ctl.filled = 0;
525 ctl.valid = 1;
528 ncp_read_volume_list(filp, dirent, filldir, &ctl);
530 ncp_do_readdir(filp, dirent, filldir, &ctl);
532 ctl.head.end = ctl.fpos - 1;
533 ctl.head.eof = ctl.valid;
536 cache->head = ctl.head;
542 if (ctl.page) {
543 kunmap(ctl.page);
544 SetPageUptodate(ctl.page);
545 unlock_page(ctl.page);
546 page_cache_release(ctl.page);
559 struct ncp_cache_control ctl = *ctrl;
606 newdent->d_fsdata = (void *) ctl.fpos;
610 if (ctl.idx >= NCP_DIRCACHE_SIZE) {
611 if (ctl.page) {
612 kunmap(ctl.page);
613 SetPageUptodate(ctl.page);
614 unlock_page(ctl.page);
615 page_cache_release(ctl.page);
617 ctl.cache = NULL;
618 ctl.idx -= NCP_DIRCACHE_SIZE;
619 ctl.ofs += 1;
620 ctl.page = grab_cache_page(&inode->i_data, ctl.ofs);
621 if (ctl.page)
622 ctl.cache = kmap(ctl.page);
624 if (ctl.cache) {
625 ctl.cache->dentry[ctl.idx] = newdent;
631 ctl.valid = 0;
632 if (!ctl.filled && (ctl.fpos == filp->f_pos)) {
637 ctl.filled = filldir(dirent, qname.name, qname.len,
639 if (!ctl.filled)
642 ctl.fpos += 1;
643 ctl.idx += 1;
644 *ctrl = ctl;
645 return (ctl.valid || !ctl.filled);
650 struct ncp_cache_control *ctl)
679 if (!ncp_fill_cache(filp, dirent, filldir, ctl, &entry))
686 struct ncp_cache_control *ctl)
742 if (!ncp_fill_cache(filp, dirent, filldir, ctl, &entry))