From 7fa5018c9d0c527fa9c1b8124954991631a265e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Mon, 14 Mar 2005 01:53:38 +0000 Subject: [PATCH] We always want to hold the parent's lock in Inode::Create(), even if we just create an attribute directory. Removed the now unnecessary UNSAFE_GET_VNODE lines. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11724 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/kernel/file_systems/bfs/Inode.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/add-ons/kernel/file_systems/bfs/Inode.cpp b/src/add-ons/kernel/file_systems/bfs/Inode.cpp index e9d0c6e2c4..50762ad037 100644 --- a/src/add-ons/kernel/file_systems/bfs/Inode.cpp +++ b/src/add-ons/kernel/file_systems/bfs/Inode.cpp @@ -2100,7 +2100,7 @@ Inode::Create(Transaction &transaction, Inode *parent, const char *name, int32 m RETURN_ERROR(B_BAD_VALUE); } - WriteLocked locker(tree != NULL ? &parent->Lock() : NULL); + WriteLocked locker(parent != NULL ? &parent->Lock() : NULL); // the parent directory is locked during the whole inode creation if (tree != NULL) { @@ -2359,12 +2359,8 @@ AttributeIterator::GetNext(char *name, size_t *_length, uint32 *_type, vnode_id // if you haven't yet access to the attributes directory, get it if (fAttributes == NULL) { -#ifdef UNSAFE_GET_VNODE - RecursiveLocker locker(volume->Lock()); -#endif if (get_vnode(volume->ID(), volume->ToVnode(fInode->Attributes()), - (void **)&fAttributes) != 0 - || fAttributes == NULL) { + (void **)&fAttributes) != B_OK) { FATAL(("get_vnode() failed in AttributeIterator::GetNext(vnode_id = %Ld,name = \"%s\")\n",fInode->ID(),name)); return B_ENTRY_NOT_FOUND; }