* We must call file_cache_disable() with O_NOCACHE also in bfs_create().

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26796 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2008-08-04 16:04:57 +00:00
parent 3b364ddd42
commit c7dc57457d

View File

@ -810,9 +810,16 @@ bfs_create(fs_volume* _volume, fs_vnode* _directory, const char* name,
Transaction transaction(volume, directory->BlockNumber());
Inode* inode;
bool created;
status_t status = Inode::Create(transaction, directory, name,
S_FILE | (mode & S_IUMSK), openMode, 0, &created, _vnodeID);
S_FILE | (mode & S_IUMSK), openMode, 0, &created, _vnodeID, &inode);
// Disable the file cache, if requested?
if (status == B_OK && (openMode & O_NOCACHE) != 0
&& inode->FileCache() != NULL) {
status = file_cache_disable(inode->FileCache());
}
if (status >= B_OK) {
transaction.Done();