Module Name: src Committed By: pooka Date: Fri Nov 12 17:46:09 UTC 2010
Modified Files: src/sys/fs/puffs: puffs_msgif.c Log Message: Allow clients to reuse a "park". Patch from <yamt>, fixes PR kern/44086 by him. To generate a diff of this commit: cvs rdiff -u -r1.82 -r1.83 src/sys/fs/puffs/puffs_msgif.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/fs/puffs/puffs_msgif.c diff -u src/sys/fs/puffs/puffs_msgif.c:1.82 src/sys/fs/puffs/puffs_msgif.c:1.83 --- src/sys/fs/puffs/puffs_msgif.c:1.82 Tue Jul 6 17:00:06 2010 +++ src/sys/fs/puffs/puffs_msgif.c Fri Nov 12 17:46:09 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: puffs_msgif.c,v 1.82 2010/07/06 17:00:06 pooka Exp $ */ +/* $NetBSD: puffs_msgif.c,v 1.83 2010/11/12 17:46:09 pooka Exp $ */ /* * Copyright (c) 2005, 2006, 2007 Antti Kantee. All Rights Reserved. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: puffs_msgif.c,v 1.82 2010/07/06 17:00:06 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: puffs_msgif.c,v 1.83 2010/11/12 17:46:09 pooka Exp $"); #include <sys/param.h> #include <sys/atomic.h> @@ -332,6 +332,14 @@ struct puffs_req *preq, *creq; ssize_t delta; + /* + * Some clients reuse a park, so reset some flags. We might + * want to provide a caller-side interface for this and add + * a few more invariant checks here, but this will do for now. + */ + park->park_flags &= ~(PARKFLAG_DONE | PARKFLAG_HASERROR); + KASSERT((park->park_flags & PARKFLAG_WAITERGONE) == 0); + mp = PMPTOMP(pmp); preq = park->park_preq;