* Since we know the address of the lock in question, there is no need to waste

memory by naming it individually.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33881 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2009-11-04 15:55:11 +00:00
parent 56e4496947
commit c07fb64478

View File

@ -335,11 +335,7 @@ Inode::Inode(Volume* volume, ino_t id)
UpdateNodeFromDisk();
char lockName[B_OS_NAME_LENGTH];
snprintf(lockName, sizeof(lockName), "bfs inode %d.%d",
(int)BlockRun().AllocationGroup(), BlockRun().Start());
rw_lock_init_etc(&fLock, lockName, RW_LOCK_FLAG_CLONE_NAME);
rw_lock_init(&fLock, "bfs inode");
recursive_lock_init(&fSmallDataLock, "bfs inode small data");
// these two will help to maintain the indices
@ -368,11 +364,7 @@ Inode::Inode(Volume* volume, Transaction& transaction, ino_t id, mode_t mode,
PRINT(("Inode::Inode(volume = %p, transaction = %p, id = %Ld) @ %p\n",
volume, &transaction, id, this));
char lockName[B_OS_NAME_LENGTH];
snprintf(lockName, sizeof(lockName), "bfs inode+%d.%d",
(int)run.AllocationGroup(), run.Start());
rw_lock_init_etc(&fLock, lockName, RW_LOCK_FLAG_CLONE_NAME);
rw_lock_init(&fLock, "bfs inode");
recursive_lock_init(&fSmallDataLock, "bfs inode small data");
NodeGetter node(volume, transaction, this, true);