]> git.pld-linux.org Git - packages/db4.1.git/blob - patch.4.1.25.3
- added 4.1.25.[23] patches
[packages/db4.1.git] / patch.4.1.25.3
1 *** mp/mp_fget.c.orig   2002-08-07 08:23:01.000000000 -0700
2 --- mp/mp_fget.c        2006-05-30 20:32:20.000000000 -0700
3 ***************
4 *** 506,513 ****
5          */
6         if (state != SECOND_MISS && bhp->ref == 1) {
7                 bhp->priority = UINT32_T_MAX;
8 !               SH_TAILQ_REMOVE(&hp->hash_bucket, bhp, hq, __bh);
9 !               SH_TAILQ_INSERT_TAIL(&hp->hash_bucket, bhp, hq);
10                 hp->hash_priority =
11                     SH_TAILQ_FIRST(&hp->hash_bucket, __bh)->priority;
12         }
13 --- 506,517 ----
14          */
15         if (state != SECOND_MISS && bhp->ref == 1) {
16                 bhp->priority = UINT32_T_MAX;
17 !               /* Move the buffer if there are others in the bucket. */
18 !               if (SH_TAILQ_FIRST(&hp->hash_bucket, __bh) != bhp
19 !                   || SH_TAILQ_NEXT(bhp, hq, __bh) != NULL) {
20 !                       SH_TAILQ_REMOVE(&hp->hash_bucket, bhp, hq, __bh);
21 !                       SH_TAILQ_INSERT_TAIL(&hp->hash_bucket, bhp, hq);
22 !               }
23                 hp->hash_priority =
24                     SH_TAILQ_FIRST(&hp->hash_bucket, __bh)->priority;
25         }
26 *** mp/mp_fput.c.orig   2002-08-13 06:26:41.000000000 -0700
27 --- mp/mp_fput.c        2006-05-30 20:55:11.000000000 -0700
28 ***************
29 *** 166,171 ****
30 --- 166,176 ----
31          * to the correct position in the list.
32          */
33         argbhp = bhp;
34 +       /* Move the buffer if there are others in the bucket. */
35 +       if (SH_TAILQ_FIRST(&hp->hash_bucket, __bh) == bhp
36 +           && SH_TAILQ_NEXT(bhp, hq, __bh) != NULL)
37 +               goto done;
38
39         SH_TAILQ_REMOVE(&hp->hash_bucket, argbhp, hq, __bh);
40   
41         prev = NULL;
42 ***************
43 *** 178,183 ****
44 --- 183,189 ----
45         else
46                 SH_TAILQ_INSERT_AFTER(&hp->hash_bucket, prev, argbhp, hq, __bh);
47   
48 + done:
49         /* Reset the hash bucket's priority. */
50         hp->hash_priority = SH_TAILQ_FIRST(&hp->hash_bucket, __bh)->priority;
This page took 0.04753 seconds and 3 git commands to generate.