Fixed a bug reported by Ingo: attribute inodes didn't get a file cache attached,

but tried to use it anyway.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10880 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2005-01-19 17:15:03 +00:00
parent a4480535ad
commit 62f7d84a85
1 changed files with 2 additions and 2 deletions

View File

@ -178,7 +178,7 @@ Inode::Inode(Volume *volume, vnode_id id)
if (IsContainer())
fTree = new BPlusTree(this);
if (IsFile())
if (IsFile() || IsAttribute())
SetFileCache(file_cache_create(fVolume->ID(), ID(), Size(), fVolume->Device()));
}
@ -2255,7 +2255,7 @@ Inode::Create(Transaction &transaction, Inode *parent, const char *name, int32 m
DIE(("new_vnode() failed for inode!"));
}
if (inode->IsFile())
if (inode->IsFile() || inode->IsAttribute())
inode->SetFileCache(file_cache_create(volume->ID(), inode->ID(), inode->Size(), volume->Device()));
if (_id != NULL)