• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500-V1.0.1.40_1.0.68/src/linux/linux-2.6/fs/nfsd/

Lines Matching defs:sop

119 static void release_stateowner(struct nfs4_stateowner *sop);
383 struct nfs4_stateowner *sop;
411 sop = list_entry(clp->cl_openowners.next, struct nfs4_stateowner, so_perclient);
412 release_stateowner(sop);
1039 struct nfs4_stateowner *sop =
1041 kfree(sop->so_owner.data);
1042 kmem_cache_free(stateowner_slab, sop);
1048 struct nfs4_stateowner *sop;
1050 if ((sop = kmem_cache_alloc(stateowner_slab, GFP_KERNEL))) {
1051 if ((sop->so_owner.data = kmalloc(owner->len, GFP_KERNEL))) {
1052 memcpy(sop->so_owner.data, owner->data, owner->len);
1053 sop->so_owner.len = owner->len;
1054 kref_init(&sop->so_ref);
1055 return sop;
1057 kmem_cache_free(stateowner_slab, sop);
1064 struct nfs4_stateowner *sop;
1068 if (!(sop = alloc_stateowner(&open->op_owner)))
1071 INIT_LIST_HEAD(&sop->so_idhash);
1072 INIT_LIST_HEAD(&sop->so_strhash);
1073 INIT_LIST_HEAD(&sop->so_perclient);
1074 INIT_LIST_HEAD(&sop->so_stateids);
1075 INIT_LIST_HEAD(&sop->so_perstateid); /* not used */
1076 INIT_LIST_HEAD(&sop->so_close_lru);
1077 sop->so_time = 0;
1078 list_add(&sop->so_idhash, &ownerid_hashtbl[idhashval]);
1079 list_add(&sop->so_strhash, &ownerstr_hashtbl[strhashval]);
1080 list_add(&sop->so_perclient, &clp->cl_openowners);
1081 sop->so_is_open_owner = 1;
1082 sop->so_id = current_ownerid++;
1083 sop->so_client = clp;
1084 sop->so_seqid = open->op_seqid;
1085 sop->so_confirmed = 0;
1086 rp = &sop->so_replay;
1090 return sop;
1108 unhash_stateowner(struct nfs4_stateowner *sop)
1112 list_del(&sop->so_idhash);
1113 list_del(&sop->so_strhash);
1114 if (sop->so_is_open_owner)
1115 list_del(&sop->so_perclient);
1116 list_del(&sop->so_perstateid);
1117 while (!list_empty(&sop->so_stateids)) {
1118 stp = list_entry(sop->so_stateids.next,
1120 if (sop->so_is_open_owner)
1128 release_stateowner(struct nfs4_stateowner *sop)
1130 unhash_stateowner(sop);
1131 list_del(&sop->so_close_lru);
1132 nfs4_put_stateowner(sop);
1137 struct nfs4_stateowner *sop = open->op_stateowner;
1138 unsigned int hashval = stateid_hashval(sop->so_id, fp->fi_id);
1145 list_add(&stp->st_perstateowner, &sop->so_stateids);
1147 stp->st_stateowner = sop;
1151 stp->st_stateid.si_stateownerid = sop->so_id;
1180 move_to_close_lru(struct nfs4_stateowner *sop)
1182 dprintk("NFSD: move_to_close_lru nfs4_stateowner %p\n", sop);
1184 list_move_tail(&sop->so_close_lru, &close_lru);
1185 sop->so_time = get_seconds();
1189 cmp_owner_str(struct nfs4_stateowner *sop, struct xdr_netobj *owner, clientid_t *clid) {
1190 return ((sop->so_owner.len == owner->len) &&
1191 !memcmp(sop->so_owner.data, owner->data, owner->len) &&
1192 (sop->so_client->cl_clientid.cl_id == clid->cl_id));
1437 struct nfs4_stateowner *sop = NULL;
1446 sop = find_openstateowner_str(strhashval, open);
1447 open->op_stateowner = sop;
1448 if (!sop) {
1455 if (!sop->so_confirmed) {
1457 clp = sop->so_client;
1458 release_stateowner(sop);
1462 if (open->op_seqid == sop->so_seqid - 1) {
1463 if (sop->so_replay.rp_buflen)
1474 if (open->op_seqid != sop->so_seqid)
1478 sop = alloc_init_open_stateowner(strhashval, clp, open);
1479 if (sop == NULL)
1481 open->op_stateowner = sop;
1483 list_del_init(&sop->so_close_lru);
1484 renew_client(sop->so_client);
1538 struct nfs4_stateowner *sop = open->op_stateowner;
1545 if (local->st_stateowner == sop)
1652 struct nfs4_stateowner *sop = stp->st_stateowner;
1653 struct nfs4_callback *cb = &sop->so_client->cl_callback;
1672 if (!atomic_read(&cb->cb_set) || !sop->so_confirmed)
1683 dp = alloc_init_deleg(sop->so_client, stp, fh, flag);
1862 struct nfs4_stateowner *sop;
1909 sop = list_entry(pos, struct nfs4_stateowner, so_close_lru);
1910 if (time_after((unsigned long)sop->so_time, (unsigned long)cutoff)) {
1911 u = sop->so_time - cutoff;
1917 sop->so_id);
1918 release_stateowner(sop);
2116 struct nfs4_stateowner *sop;
2144 sop = search_close_lru(stateid->si_stateownerid, flags);
2145 if (sop == NULL)
2147 *sopp = sop;
2152 struct nfs4_stateowner *sop = stp->st_stateowner;
2154 struct nfs4_client *clp = sop->so_client;
2161 if (!sop->so_is_open_owner)
2184 *sopp = sop = stp->st_stateowner;
2191 if (seqid != sop->so_seqid)
2194 if (sop->so_confirmed && flags & CONFIRM) {
2199 if (!sop->so_confirmed && !(flags & CONFIRM)) {
2213 renew_client(sop->so_client);
2217 if (seqid == sop->so_seqid - 1) {
2223 sop->so_seqid, seqid);
2233 struct nfs4_stateowner *sop;
2252 sop = oc->oc_stateowner;
2253 sop->so_confirmed = 1;
2263 nfsd4_create_clid_dir(sop->so_client);
2510 struct nfs4_stateowner *sop;
2514 sop = (struct nfs4_stateowner *) fl->fl_owner;
2515 hval = lockownerid_hashval(sop->so_id);
2516 kref_get(&sop->so_ref);
2517 deny->ld_sop = sop;
2518 deny->ld_clientid = sop->so_client->cl_clientid;
2557 struct nfs4_stateowner *sop;
2561 if (!(sop = alloc_stateowner(&lock->lk_new_owner)))
2564 INIT_LIST_HEAD(&sop->so_idhash);
2565 INIT_LIST_HEAD(&sop->so_strhash);
2566 INIT_LIST_HEAD(&sop->so_perclient);
2567 INIT_LIST_HEAD(&sop->so_stateids);
2568 INIT_LIST_HEAD(&sop->so_perstateid);
2569 INIT_LIST_HEAD(&sop->so_close_lru); /* not used */
2570 sop->so_time = 0;
2571 list_add(&sop->so_idhash, &lock_ownerid_hashtbl[idhashval]);
2572 list_add(&sop->so_strhash, &lock_ownerstr_hashtbl[strhashval]);
2573 list_add(&sop->so_perstateid, &open_stp->st_lockowners);
2574 sop->so_is_open_owner = 0;
2575 sop->so_id = current_ownerid++;
2576 sop->so_client = clp;
2579 sop->so_seqid = lock->lk_new_lock_seqid + 1;
2580 sop->so_confirmed = 1;
2581 rp = &sop->so_replay;
2585 return sop;
2589 alloc_init_lock_stateid(struct nfs4_stateowner *sop, struct nfs4_file *fp, struct nfs4_stateid *open_stp)
2592 unsigned int hashval = stateid_hashval(sop->so_id, fp->fi_id);
2603 list_add(&stp->st_perstateowner, &sop->so_stateids);
2604 stp->st_stateowner = sop;
2608 stp->st_stateid.si_stateownerid = sop->so_id;
2974 struct nfs4_stateowner *sop;
2994 list_for_each_entry(sop, &lock_ownerid_hashtbl[i], so_idhash) {
2995 if (!cmp_owner_str(sop, owner, clid))
2997 list_for_each_entry(stp, &sop->so_stateids,
2999 if (check_for_locks(stp->st_vfs_file, sop))
3003 list_add(&sop->so_perclient, &matches);
3012 sop = list_entry(matches.next, struct nfs4_stateowner,
3016 list_del(&sop->so_perclient);
3017 release_stateowner(sop);