/[hurd]/hurd/nfsd/cache.c
ViewVC logotype

Diff of /hurd/nfsd/cache.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.9 by marcus, Fri Dec 1 19:16:02 2000 UTC revision 1.10 by roland, Wed May 8 09:29:13 2002 UTC
# Line 1  Line 1 
1  /*  /*
2     Copyright (C) 1996, 1998, 1999, 2000 Free Software Foundation, Inc.     Copyright (C) 1996,98,99,2000,02 Free Software Foundation, Inc.
3     Written by Michael I. Bushnell, p/BSG.     Written by Michael I. Bushnell, p/BSG.
4    
5     This file is part of the GNU Hurd.     This file is part of the GNU Hurd.
# Line 212  scan_creds () Line 212  scan_creds ()
212        for (n = 0; n < IDHASH_TABLE_SIZE && nfreeids; n++)        for (n = 0; n < IDHASH_TABLE_SIZE && nfreeids; n++)
213          {          {
214            struct idspec *i = idhashtable[n];            struct idspec *i = idhashtable[n];
215              
216            while (i && nfreeids)            while (i && nfreeids)
217              {              {
218                struct idspec *next_i = i->next;                struct idspec *next_i = i->next;
219                  
220                if (!i->references                if (!i->references
221                    && mapped_time->seconds - i->lastuse > ID_KEEP_TIMEOUT)                    && mapped_time->seconds - i->lastuse > ID_KEEP_TIMEOUT)
222                  {                  {
# Line 256  fh_hash (char *fhandle, struct idspec *i Line 256  fh_hash (char *fhandle, struct idspec *i
256    
257    for (n = 0; n < NFS2_FHSIZE; n++)    for (n = 0; n < NFS2_FHSIZE; n++)
258      hash += fhandle[n];      hash += fhandle[n];
259    hash += (int) i >> 6;    hash += (intptr_t) i >> 6;
260    return hash % FHHASH_TABLE_SIZE;    return hash % FHHASH_TABLE_SIZE;
261  }  }
262    
# Line 540  scan_replies () Line 540  scan_replies ()
540            while (cr && nfreereplies)            while (cr && nfreereplies)
541              {              {
542                struct cached_reply *next_cr = cr->next;                struct cached_reply *next_cr = cr->next;
543              
544                if (!cr->references                if (!cr->references
545                    && mapped_time->seconds - cr->lastuse > REPLY_KEEP_TIMEOUT)                    && mapped_time->seconds - cr->lastuse > REPLY_KEEP_TIMEOUT)
546                  {                  {

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26