From: David van Moolenbroek Date: Sun, 24 Aug 2014 09:26:17 +0000 (+0000) Subject: VFS: do not call REQ_FLUSH on the root file system X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/man.dnssec-signzone.html?a=commitdiff_plain;h=71cd1dd4b91859128b87967bab32f4cf48d475b9;p=minix.git VFS: do not call REQ_FLUSH on the root file system Change-Id: I15d29a6f3d198e604ea7f7a9db600d6d18b6994b --- diff --git a/minix/servers/vfs/filedes.c b/minix/servers/vfs/filedes.c index 6adc70386..13bd6c8b6 100644 --- a/minix/servers/vfs/filedes.c +++ b/minix/servers/vfs/filedes.c @@ -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();