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

Lines Matching refs:sop

356 static void unhash_lockowner(struct nfs4_stateowner *sop)
360 list_del(&sop->so_idhash);
361 list_del(&sop->so_strhash);
362 list_del(&sop->so_perstateid);
363 while (!list_empty(&sop->so_stateids)) {
364 stp = list_first_entry(&sop->so_stateids,
370 static void release_lockowner(struct nfs4_stateowner *sop)
372 unhash_lockowner(sop);
373 nfs4_put_stateowner(sop);
454 static void unhash_openowner(struct nfs4_stateowner *sop)
458 list_del(&sop->so_idhash);
459 list_del(&sop->so_strhash);
460 list_del(&sop->so_perclient);
461 list_del(&sop->so_perstateid);
462 while (!list_empty(&sop->so_stateids)) {
463 stp = list_first_entry(&sop->so_stateids,
469 static void release_openowner(struct nfs4_stateowner *sop)
471 unhash_openowner(sop);
472 list_del(&sop->so_close_lru);
473 nfs4_put_stateowner(sop);
827 struct nfs4_stateowner *sop;
847 sop = list_entry(clp->cl_openowners.next, struct nfs4_stateowner, so_perclient);
848 release_openowner(sop);
1891 struct nfs4_stateowner *sop =
1893 kfree(sop->so_owner.data);
1894 kmem_cache_free(stateowner_slab, sop);
1900 struct nfs4_stateowner *sop;
1902 if ((sop = kmem_cache_alloc(stateowner_slab, GFP_KERNEL))) {
1903 if ((sop->so_owner.data = kmalloc(owner->len, GFP_KERNEL))) {
1904 memcpy(sop->so_owner.data, owner->data, owner->len);
1905 sop->so_owner.len = owner->len;
1906 kref_init(&sop->so_ref);
1907 return sop;
1909 kmem_cache_free(stateowner_slab, sop);
1916 struct nfs4_stateowner *sop;
1920 if (!(sop = alloc_stateowner(&open->op_owner)))
1923 INIT_LIST_HEAD(&sop->so_idhash);
1924 INIT_LIST_HEAD(&sop->so_strhash);
1925 INIT_LIST_HEAD(&sop->so_perclient);
1926 INIT_LIST_HEAD(&sop->so_stateids);
1927 INIT_LIST_HEAD(&sop->so_perstateid); /* not used */
1928 INIT_LIST_HEAD(&sop->so_close_lru);
1929 sop->so_time = 0;
1930 list_add(&sop->so_idhash, &ownerid_hashtbl[idhashval]);
1931 list_add(&sop->so_strhash, &ownerstr_hashtbl[strhashval]);
1932 list_add(&sop->so_perclient, &clp->cl_openowners);
1933 sop->so_is_open_owner = 1;
1934 sop->so_id = current_ownerid++;
1935 sop->so_client = clp;
1936 sop->so_seqid = open->op_seqid;
1937 sop->so_confirmed = 0;
1938 rp = &sop->so_replay;
1942 return sop;
1947 struct nfs4_stateowner *sop = open->op_stateowner;
1948 unsigned int hashval = stateid_hashval(sop->so_id, fp->fi_id);
1955 list_add(&stp->st_perstateowner, &sop->so_stateids);
1957 stp->st_stateowner = sop;
1961 stp->st_stateid.si_stateownerid = sop->so_id;
1973 move_to_close_lru(struct nfs4_stateowner *sop)
1975 dprintk("NFSD: move_to_close_lru nfs4_stateowner %p\n", sop);
1977 list_move_tail(&sop->so_close_lru, &close_lru);
1978 sop->so_time = get_seconds();
1982 same_owner_str(struct nfs4_stateowner *sop, struct xdr_netobj *owner,
1985 return (sop->so_owner.len == owner->len) &&
1986 0 == memcmp(sop->so_owner.data, owner->data, owner->len) &&
1987 (sop->so_client->cl_clientid.cl_id == clid->cl_id);
2203 struct nfs4_stateowner *sop = NULL;
2212 sop = find_openstateowner_str(strhashval, open);
2213 open->op_stateowner = sop;
2214 if (!sop) {
2224 if (!sop->so_confirmed) {
2226 clp = sop->so_client;
2227 release_openowner(sop);
2231 if (open->op_seqid == sop->so_seqid - 1) {
2232 if (sop->so_replay.rp_buflen)
2243 if (open->op_seqid != sop->so_seqid)
2247 sop = alloc_init_open_stateowner(strhashval, clp, open);
2248 if (sop == NULL)
2250 open->op_stateowner = sop;
2252 list_del_init(&sop->so_close_lru);
2253 renew_client(sop->so_client);
2313 struct nfs4_stateowner *sop = open->op_stateowner;
2320 if (local->st_stateowner == sop)
2447 struct nfs4_stateowner *sop = stp->st_stateowner;
2448 int cb_up = atomic_read(&sop->so_client->cl_cb_set);
2467 if (!cb_up || !sop->so_confirmed)
2478 dp = alloc_init_deleg(sop->so_client, stp, fh, flag);
2660 struct nfs4_stateowner *sop;
2719 sop = list_entry(pos, struct nfs4_stateowner, so_close_lru);
2720 if (time_after((unsigned long)sop->so_time, (unsigned long)cutoff)) {
2721 u = sop->so_time - cutoff;
2727 sop->so_id);
2728 release_openowner(sop);
2962 struct nfs4_stateowner *sop;
2994 sop = search_close_lru(stateid->si_stateownerid, flags);
2995 if (sop == NULL)
2997 *sopp = sop;
3002 *sopp = sop = stp->st_stateowner;
3006 struct nfs4_client *clp = sop->so_client;
3013 if (!sop->so_is_open_owner)
3040 if (!(flags & HAS_SESSION) && seqid != sop->so_seqid)
3043 if (sop->so_confirmed && flags & CONFIRM) {
3048 if (!sop->so_confirmed && !(flags & CONFIRM)) {
3056 renew_client(sop->so_client);
3060 if (seqid == sop->so_seqid - 1) {
3066 sop->so_seqid, seqid);
3076 struct nfs4_stateowner *sop;
3095 sop = oc->oc_stateowner;
3096 sop->so_confirmed = 1;
3102 nfsd4_create_clid_dir(sop->so_client);
3392 struct nfs4_stateowner *sop;
3395 sop = (struct nfs4_stateowner *) fl->fl_owner;
3396 kref_get(&sop->so_ref);
3397 deny->ld_sop = sop;
3398 deny->ld_clientid = sop->so_client->cl_clientid;
3437 struct nfs4_stateowner *sop;
3441 if (!(sop = alloc_stateowner(&lock->lk_new_owner)))
3444 INIT_LIST_HEAD(&sop->so_idhash);
3445 INIT_LIST_HEAD(&sop->so_strhash);
3446 INIT_LIST_HEAD(&sop->so_perclient);
3447 INIT_LIST_HEAD(&sop->so_stateids);
3448 INIT_LIST_HEAD(&sop->so_perstateid);
3449 INIT_LIST_HEAD(&sop->so_close_lru); /* not used */
3450 sop->so_time = 0;
3451 list_add(&sop->so_idhash, &lock_ownerid_hashtbl[idhashval]);
3452 list_add(&sop->so_strhash, &lock_ownerstr_hashtbl[strhashval]);
3453 list_add(&sop->so_perstateid, &open_stp->st_lockowners);
3454 sop->so_is_open_owner = 0;
3455 sop->so_id = current_ownerid++;
3456 sop->so_client = clp;
3459 sop->so_seqid = lock->lk_new_lock_seqid + 1;
3460 sop->so_confirmed = 1;
3461 rp = &sop->so_replay;
3465 return sop;
3469 alloc_init_lock_stateid(struct nfs4_stateowner *sop, struct nfs4_file *fp, struct nfs4_stateid *open_stp)
3472 unsigned int hashval = stateid_hashval(sop->so_id, fp->fi_id);
3483 list_add(&stp->st_perstateowner, &sop->so_stateids);
3484 stp->st_stateowner = sop;
3488 stp->st_stateid.si_stateownerid = sop->so_id;
3867 struct nfs4_stateowner *sop;
3887 list_for_each_entry(sop, &lock_ownerid_hashtbl[i], so_idhash) {
3888 if (!same_owner_str(sop, owner, clid))
3890 list_for_each_entry(stp, &sop->so_stateids,
3892 if (check_for_locks(stp->st_file, sop))
3896 list_add(&sop->so_perclient, &matches);
3905 sop = list_entry(matches.next, struct nfs4_stateowner,
3909 list_del(&sop->so_perclient);
3910 release_lockowner(sop);