Fix one more bug from today's commit: don't remove the op for which

getops runs out of file server buffer space from the request queue.
Otherwise that operation silently vanishes and things go, well, quite
wrong.
This commit is contained in:
pooka 2007-04-04 21:02:30 +00:00
parent a0d5166093
commit 3651f3e73b

View File

@ -1,4 +1,4 @@
/* $NetBSD: puffs_msgif.c,v 1.27 2007/04/04 20:22:47 pooka Exp $ */
/* $NetBSD: puffs_msgif.c,v 1.28 2007/04/04 21:02:30 pooka Exp $ */
/*
* Copyright (c) 2005, 2006, 2007 Antti Kantee. All Rights Reserved.
@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: puffs_msgif.c,v 1.27 2007/04/04 20:22:47 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: puffs_msgif.c,v 1.28 2007/04/04 21:02:30 pooka Exp $");
#include <sys/param.h>
#include <sys/fstrans.h>
@ -633,16 +633,16 @@ puffs_getop(struct puffs_mount *pmp, struct puffs_reqh_get *phg, int nonblock)
}
preq = park->park_preq;
TAILQ_REMOVE(&pmp->pmp_req_touser, park, park_entries);
KASSERT(park->park_flags & PARKFLAG_ONQUEUE1);
park->park_flags &= ~PARKFLAG_ONQUEUE1;
if (phg->phg_buflen < preq->preq_buflen) {
if (!donesome)
error = E2BIG;
puffs_park_release(park, 0);
goto out;
}
TAILQ_REMOVE(&pmp->pmp_req_touser, park, park_entries);
KASSERT(park->park_flags & PARKFLAG_ONQUEUE1);
park->park_flags &= ~PARKFLAG_ONQUEUE1;
mutex_exit(&pmp->pmp_lock);
DPRINTF(("puffsgetop: get op %" PRIu64 " (%d.), from %p "