Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/miscfs/specfs specfs: Delete bogus comment about .d_open...



details:   https://anonhg.NetBSD.org/src/rev/b2224e001512
branches:  trunk
changeset: 364501:b2224e001512
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Mar 28 12:35:08 2022 +0000

description:
specfs: Delete bogus comment about .d_open/.d_close at same time.

Annoying as it is that .d_open and .d_close can run at the same time,
it is also necessary for tty semantics, where open can block
indefinitely, and it is the responsibility of close (called via
revoke) necessary to interrupt it.

diffstat:

 sys/miscfs/specfs/spec_vnops.c |  10 ++--------
 1 files changed, 2 insertions(+), 8 deletions(-)

diffs (31 lines):

diff -r ed8897af141e -r b2224e001512 sys/miscfs/specfs/spec_vnops.c
--- a/sys/miscfs/specfs/spec_vnops.c    Mon Mar 28 12:34:59 2022 +0000
+++ b/sys/miscfs/specfs/spec_vnops.c    Mon Mar 28 12:35:08 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: spec_vnops.c,v 1.190 2022/03/28 12:34:59 riastradh Exp $       */
+/*     $NetBSD: spec_vnops.c,v 1.191 2022/03/28 12:35:08 riastradh Exp $       */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -58,7 +58,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: spec_vnops.c,v 1.190 2022/03/28 12:34:59 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: spec_vnops.c,v 1.191 2022/03/28 12:35:08 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/proc.h>
@@ -557,12 +557,6 @@
         * But first check whether it has been revoked -- if so, we
         * can't acquire more open references and we must fail
         * immediately with EBADF.
-        *
-        * XXX This races with revoke: once we release the vnode lock,
-        * the vnode may be revoked, and the .d_close callback run, at
-        * the same time as we're calling .d_open here.  Drivers
-        * shouldn't have to contemplate this scenario; .d_open and
-        * .d_close should be prevented from running concurrently.
         */
        switch (vp->v_type) {
        case VCHR:



Home | Main Index | Thread Index | Old Index