From 08aba34e742ec3ebceed9f09a315b61168e87c5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Sat, 28 Jun 2008 16:01:16 +0000 Subject: [PATCH] * Removed a now unnecessary stat() on the device to be mounted. * Minor cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26153 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/kernel/file_systems/bfs/Volume.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/add-ons/kernel/file_systems/bfs/Volume.cpp b/src/add-ons/kernel/file_systems/bfs/Volume.cpp index 8b821c42f2..73fbf66cf2 100644 --- a/src/add-ons/kernel/file_systems/bfs/Volume.cpp +++ b/src/add-ons/kernel/file_systems/bfs/Volume.cpp @@ -328,12 +328,6 @@ Volume::Mount(const char *deviceName, uint32 flags) if (opener.IsReadOnly()) fFlags |= VOLUME_READ_ONLY; - // check if it's a regular file, and if so, disable the cache for the - // underlaying file system - struct stat stat; - if (fstat(fDevice, &stat) < 0) - RETURN_ERROR(B_ERROR); - // read the super block if (Identify(fDevice, &fSuperBlock) != B_OK) { FATAL(("invalid super block!\n")); @@ -387,7 +381,7 @@ Volume::Mount(const char *deviceName, uint32 flags) } fRootNode = new Inode(this, ToVnode(Root())); - if (fRootNode && fRootNode->InitCheck() == B_OK) { + if (fRootNode != NULL && fRootNode->InitCheck() == B_OK) { status = publish_vnode(fVolume, ToVnode(Root()), (void *)fRootNode, &gBFSVnodeOps, fRootNode->Mode(), 0); if (status == B_OK) {