* 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
This commit is contained in:
Axel Dörfler 2008-06-28 16:01:16 +00:00
parent ef098c9099
commit 08aba34e74

View File

@ -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) {