diff options
| author | svn2git <svn2git@FreeBSD.org> | 1994-05-01 08:00:00 +0000 | 
|---|---|---|
| committer | svn2git <svn2git@FreeBSD.org> | 1994-05-01 08:00:00 +0000 | 
| commit | a16f65c7d117419bd266c28a1901ef129a337569 (patch) | |
| tree | 2626602f66dc3551e7a7c7bc9ad763c3bc7ab40a /lib/libc/db/recno/rec_seq.c | |
| parent | 8503f4f13f77abf7adc8f7e329c6f9c1d52b6a20 (diff) | |
Diffstat (limited to 'lib/libc/db/recno/rec_seq.c')
| -rw-r--r-- | lib/libc/db/recno/rec_seq.c | 15 | 
1 files changed, 12 insertions, 3 deletions
| diff --git a/lib/libc/db/recno/rec_seq.c b/lib/libc/db/recno/rec_seq.c index 29210a753697..bc66d1c4987e 100644 --- a/lib/libc/db/recno/rec_seq.c +++ b/lib/libc/db/recno/rec_seq.c @@ -32,7 +32,7 @@   */  #ifndef lint -static char sccsid[] = "@(#)rec_seq.c	8.1 (Berkeley) 6/4/93"; +static char sccsid[] = "@(#)rec_seq.c	8.2 (Berkeley) 9/7/93";  #endif /* not lint */  #include <sys/types.h> @@ -69,6 +69,13 @@ __rec_seq(dbp, key, data, flags)  	int status;  	t = dbp->internal; + +	/* Toss any page pinned across calls. */ +	if (t->bt_pinned != NULL) { +		mpool_put(t->bt_mp, t->bt_pinned, 0); +		t->bt_pinned = NULL; +	} +  	switch(flags) {  	case R_CURSOR:  		if ((nrec = *(recno_t *)key->data) == 0) @@ -116,7 +123,9 @@ einval:		errno = EINVAL;  	t->bt_rcursor = nrec;  	status = __rec_ret(t, e, nrec, key, data); - -	mpool_put(t->bt_mp, e->page, 0); +	if (ISSET(t, B_DB_LOCK)) +		mpool_put(t->bt_mp, e->page, 0); +	else +		t->bt_pinned = e->page;  	return (status);  } | 
