if (!F_ISSET(dbp, DB_AM_LOCKING))
if (!F_ISSET(dbp, DB_AM_LOCKING)) { *lockp = LOCK_INVALID;
__bam_lget(dbp, do_couple, pgno, mode, lockp)	DB *dbp;	int do_couple;	db_pgno_t pgno;	db_lockmode_t mode;	DB_LOCK *lockp;{	DB_LOCKREQ couple[2];	u_int32_t locker;	int ret;	if (!F_ISSET(dbp, DB_AM_LOCKING))		return (0);	locker = dbp->txn == NULL ? dbp->locker : dbp->txn->txnid;	dbp->lock.pgno = pgno;	/*	 * If the object not currently locked, acquire the lock and return,	 * otherwise, lock couple.  If we fail and it's not a system error,	 * convert to EAGAIN.	 */	if (do_couple) {		couple[0].op = DB_LOCK_GET;		couple[0].obj = &dbp->lock_dbt;		couple[0].mode = mode;		couple[1].op = DB_LOCK_PUT;		couple[1].lock = *lockp;		ret = lock_vec(dbp->dbenv->lk_info, locker, 0, couple, 2, NULL);		if (ret != 0) {			/* If we fail, discard the lock we held. */			__bam_lput(dbp, *lockp);			return (ret < 0 ? EAGAIN : ret);		}		*lockp = couple[0].lock;	} else {		 ret = lock_get(dbp->dbenv->lk_info,		     locker, 0, &dbp->lock_dbt, mode, lockp);		 return (ret < 0 ? EAGAIN : ret);	}	return (0);}