]> Zhao Yanbai Git Server - minix.git/commitdiff
Restart process after response from async driver on non-blocking select
authorErik van der Kouwe <erik@minix3.org>
Wed, 23 Feb 2011 10:27:48 +0000 (10:27 +0000)
committerErik van der Kouwe <erik@minix3.org>
Wed, 23 Feb 2011 10:27:48 +0000 (10:27 +0000)
servers/vfs/select.c

index 5a40dc65411bb93ad6020021da3550b3cc34f21b..96c2c54d04608c71bb0b23e4a328167a306a1faf 100644 (file)
@@ -767,19 +767,18 @@ PUBLIC void select_reply1()
        dp->dmap_sel_filp= NULL;
        fp->filp_select_flags &= ~FSF_BUSY;
        if (!(fp->filp_select_flags & (FSF_UPDATE|FSF_BLOCK)))
-               fp->filp_select_ops= 0;
-       if (status != 0)
+       fp->filp_select_ops= 0;
+
+       if (status > 0)
        {
-               if (status > 0)
-               {
-                       /* Clear the replied bits from the request mask unless
-                        * FSF_UPDATE is set.
-                        */
-                       if (!(fp->filp_select_flags & FSF_UPDATE))
-                               fp->filp_select_ops &= ~status;
-               }
-               filp_status(fp, status);
+               /* Clear the replied bits from the request mask unless
+                * FSF_UPDATE is set.
+                */
+               if (!(fp->filp_select_flags & FSF_UPDATE))
+                       fp->filp_select_ops &= ~status;
        }
+       filp_status(fp, status);
+
        if (fp->filp_count > 1)
                fp->filp_count--;
        else