Lines Matching refs:entry
202 int nfs_readdir_add_to_array(struct nfs_entry *entry, struct page *page) in nfs_readdir_add_to_array() argument
215 cache_entry->cookie = entry->prev_cookie; in nfs_readdir_add_to_array()
216 cache_entry->ino = entry->ino; in nfs_readdir_add_to_array()
217 cache_entry->d_type = entry->d_type; in nfs_readdir_add_to_array()
218 ret = nfs_readdir_make_qstr(&cache_entry->string, entry->name, entry->len); in nfs_readdir_add_to_array()
221 array->last_cookie = entry->cookie; in nfs_readdir_add_to_array()
223 if (entry->eof != 0) in nfs_readdir_add_to_array()
334 struct nfs_entry *entry, struct file *file, struct inode *inode) in nfs_readdir_xdr_filler() argument
344 error = NFS_PROTO(inode)->readdir(file_dentry(file), cred, entry->cookie, pages, in nfs_readdir_xdr_filler()
363 struct nfs_entry *entry, struct xdr_stream *xdr) in xdr_decode() argument
367 error = desc->decode(xdr, entry, desc->plus); in xdr_decode()
370 entry->fattr->time_start = desc->timestamp; in xdr_decode()
371 entry->fattr->gencount = desc->gencount; in xdr_decode()
379 int nfs_same_file(struct dentry *dentry, struct nfs_entry *entry) in nfs_same_file() argument
392 if (entry->fattr->fileid != nfsi->fileid) in nfs_same_file()
394 if (entry->fh->size && nfs_compare_fh(entry->fh, &nfsi->fh) != 0) in nfs_same_file()
445 void nfs_prime_dcache(struct dentry *parent, struct nfs_entry *entry) in nfs_prime_dcache() argument
447 struct qstr filename = QSTR_INIT(entry->name, entry->len); in nfs_prime_dcache()
455 if (!(entry->fattr->valid & NFS_ATTR_FATTR_FILEID)) in nfs_prime_dcache()
457 if (!(entry->fattr->valid & NFS_ATTR_FATTR_FSID)) in nfs_prime_dcache()
485 &entry->fattr->fsid)) in nfs_prime_dcache()
487 if (nfs_same_file(dentry, entry)) { in nfs_prime_dcache()
488 if (!entry->fh->size) in nfs_prime_dcache()
491 status = nfs_refresh_inode(d_inode(dentry), entry->fattr); in nfs_prime_dcache()
493 nfs_setsecurity(d_inode(dentry), entry->fattr, entry->label); in nfs_prime_dcache()
502 if (!entry->fh->size) { in nfs_prime_dcache()
507 inode = nfs_fhget(dentry->d_sb, entry->fh, entry->fattr, entry->label); in nfs_prime_dcache()
523 int nfs_readdir_page_filler(nfs_readdir_descriptor_t *desc, struct nfs_entry *entry, in nfs_readdir_page_filler() argument
544 status = xdr_decode(desc, entry, &stream); in nfs_readdir_page_filler()
554 nfs_prime_dcache(file_dentry(desc->file), entry); in nfs_readdir_page_filler()
556 status = nfs_readdir_add_to_array(entry, page); in nfs_readdir_page_filler()
559 } while (!entry->eof); in nfs_readdir_page_filler()
562 if (count == 0 || (status == -EBADCOOKIE && entry->eof != 0)) { in nfs_readdir_page_filler()
607 struct nfs_entry entry; in nfs_readdir_xdr_to_array() local
613 entry.prev_cookie = 0; in nfs_readdir_xdr_to_array()
614 entry.cookie = desc->last_cookie; in nfs_readdir_xdr_to_array()
615 entry.eof = 0; in nfs_readdir_xdr_to_array()
616 entry.fh = nfs_alloc_fhandle(); in nfs_readdir_xdr_to_array()
617 entry.fattr = nfs_alloc_fattr(); in nfs_readdir_xdr_to_array()
618 entry.server = NFS_SERVER(inode); in nfs_readdir_xdr_to_array()
619 if (entry.fh == NULL || entry.fattr == NULL) in nfs_readdir_xdr_to_array()
622 entry.label = nfs4_label_alloc(NFS_SERVER(inode), GFP_NOWAIT); in nfs_readdir_xdr_to_array()
623 if (IS_ERR(entry.label)) { in nfs_readdir_xdr_to_array()
624 status = PTR_ERR(entry.label); in nfs_readdir_xdr_to_array()
637 status = nfs_readdir_xdr_filler(pages, desc, &entry, file, inode); in nfs_readdir_xdr_to_array()
642 status = nfs_readdir_page_filler(desc, &entry, pages, page, pglen); in nfs_readdir_xdr_to_array()
653 nfs4_label_free(entry.label); in nfs_readdir_xdr_to_array()
655 nfs_free_fattr(entry.fattr); in nfs_readdir_xdr_to_array()
656 nfs_free_fhandle(entry.fh); in nfs_readdir_xdr_to_array()
2150 static void nfs_access_free_entry(struct nfs_access_entry *entry) in nfs_access_free_entry() argument
2152 put_cred(entry->cred); in nfs_access_free_entry()
2153 kfree_rcu(entry, rcu_head); in nfs_access_free_entry()
2248 struct nfs_access_entry *entry; in __nfs_access_zap_cache() local
2252 entry = rb_entry(n, struct nfs_access_entry, rb_node); in __nfs_access_zap_cache()
2254 list_move(&entry->lru, head); in __nfs_access_zap_cache()
2283 struct nfs_access_entry *entry = in nfs_access_search_rbtree() local
2285 int cmp = cred_fscmp(cred, entry->cred); in nfs_access_search_rbtree()
2292 return entry; in nfs_access_search_rbtree()
2376 struct nfs_access_entry *entry; in nfs_access_add_rbtree() local
2382 entry = rb_entry(parent, struct nfs_access_entry, rb_node); in nfs_access_add_rbtree()
2383 cmp = cred_fscmp(set->cred, entry->cred); in nfs_access_add_rbtree()
2400 list_del(&entry->lru); in nfs_access_add_rbtree()
2402 nfs_access_free_entry(entry); in nfs_access_add_rbtree()
2469 void nfs_access_set_mask(struct nfs_access_entry *entry, u32 access_result) in nfs_access_set_mask() argument
2471 entry->mask = access_result; in nfs_access_set_mask()