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
This commit is contained in:
Axel Dörfler 2005-03-14 01:53:38 +00:00
parent b7366070fa
commit 7fa5018c9d

View File

@ -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;
}