From 3512fe0b86990b27c72d4a8c04402f804c42bc48 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Sat, 27 Jan 1996 16:32:39 +0000 Subject: (trivfs_goaway): Handle errors from ports_inhibit_class_rpcs. Allow rpcs to resume if we're going to return EBUSY. --- devio/devio.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'devio/devio.c') diff --git a/devio/devio.c b/devio/devio.c index d0f2b9fb..f1eb428a 100644 --- a/devio/devio.c +++ b/devio/devio.c @@ -271,6 +271,7 @@ trivfs_modify_stat (struct trivfs_protid *cred, struct stat *st) error_t trivfs_goaway (struct trivfs_control *fsys, int flags) { + error_t err; int force = (flags & FSYS_GOAWAY_FORCE); int nosync = (flags & FSYS_GOAWAY_NOSYNC); @@ -280,7 +281,12 @@ trivfs_goaway (struct trivfs_control *fsys, int flags) exit (0); /* Wait until all pending rpcs are done. */ - ports_inhibit_class_rpcs (root_port_class); + err = ports_inhibit_class_rpcs (root_port_class); + if (err == EINTR || (err && !force)) + { + mutex_unlock (&device_lock); + return err; + } if (force && nosync) /* Exit with extreme prejudice. */ @@ -310,6 +316,7 @@ trivfs_goaway (struct trivfs_control *fsys, int flags) busy: /* Allow normal operations to proceed. */ ports_enable_class (root_port_class); + ports_resume_class_rpcs (root_port_class); mutex_unlock(&device_lock); /* Complain that there are still users. */ -- cgit v1.2.3