]> Zhao Yanbai Git Server - minix.git/commitdiff
VFS: do not call REQ_FLUSH on the root file system 39/2739/2
authorDavid van Moolenbroek <david@minix3.org>
Sun, 24 Aug 2014 09:26:17 +0000 (09:26 +0000)
committerDavid van Moolenbroek <david@minix3.org>
Thu, 18 Sep 2014 12:46:22 +0000 (12:46 +0000)
Change-Id: I15d29a6f3d198e604ea7f7a9db600d6d18b6994b

minix/servers/vfs/filedes.c

index 6adc70386d5839793e7fe65278c2c2601eebab46..13bd6c8b61be5b1fe9f41f99d42a35012ec606f9 100644 (file)
@@ -365,12 +365,12 @@ struct filp *f;
                dev = vp->v_sdev;
                if (S_ISBLK(vp->v_mode))  {
                        lock_bsf();
-                       if (vp->v_bfs_e == ROOT_FS_E) {
+                       if (vp->v_bfs_e == ROOT_FS_E && dev != ROOT_DEV) {
                                /* Invalidate the cache unless the special is
-                                * mounted. Assume that the root filesystem's
-                                * is open only for fsck.
+                                * mounted. Be careful not to flush the root
+                                * file system either.
                                 */
-                               req_flush(vp->v_bfs_e, dev);
+                               (void) req_flush(vp->v_bfs_e, dev);
                        }
                        unlock_bsf();