]> Zhao Yanbai Git Server - minix.git/commitdiff
Driver disappearing during dev_io() is not a fatal error.
authorBen Gras <ben@minix3.org>
Wed, 15 Mar 2006 21:55:32 +0000 (21:55 +0000)
committerBen Gras <ben@minix3.org>
Wed, 15 Mar 2006 21:55:32 +0000 (21:55 +0000)
servers/fs/device.c

index 72ba958d87dea818b08e82e611e841b813b89c43..831713ed453e4e8c966fd10bd447aa97aea21ead 100644 (file)
@@ -160,8 +160,10 @@ int flags;                 /* special flags, like O_NONBLOCK */
   /* Call the task. */
   (*dp->dmap_io)(dp->dmap_driver, &dev_mess);
 
-  if(dp->dmap_driver == NONE)
-       panic(__FILE__,"dev_io: driver changed to NONE", NO_NUM);
+  if(dp->dmap_driver == NONE) {
+       /* Driver has vanished. */
+       return EIO;
+  }
 
   /* Task has completed.  See if call completed. */
   if (dev_mess.REP_STATUS == SUSPEND) {