From ee2e57b4dc7878db9108e7c31e1c0d4327b46ac8 Mon Sep 17 00:00:00 2001 From: Thomas Veerman Date: Thu, 21 Jan 2010 15:02:29 +0000 Subject: [PATCH] Add return statement after failed dev_open (fixes open count in at_wini) --- servers/vfs/open.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/servers/vfs/open.c b/servers/vfs/open.c index 93cf8e889..705a770b8 100644 --- a/servers/vfs/open.c +++ b/servers/vfs/open.c @@ -142,6 +142,7 @@ PRIVATE int common_open(register int oflags, mode_t omode) /* Invoke the driver for special processing. */ dev = (dev_t) vp->v_sdev; r = dev_open(dev, who_e, bits | (oflags & ~O_ACCMODE)); + if (r != OK) break; /* Check whether the device is mounted or not. If so, then that FS is responsible for this device. Else @@ -624,8 +625,9 @@ struct filp *fp; } /* Do any special processing on device close. */ (void) dev_close(dev, fp-filp); - /* Ignore any errors, even SUSPEND. */ + + fp->filp_mode = FILP_CLOSED; } }