* bfs_rename() did not write lock the moved inode, but only its former and

new parent directories. This would only be necessary in case it's a directory,
  but we do it always now.
* This fixes bug #2556.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26694 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2008-07-31 07:41:58 +00:00
parent cc2da70688
commit 274e684a8e

View File

@ -1069,6 +1069,8 @@ bfs_rename(fs_volume *_volume, fs_vnode *_oldDir, const char *oldName,
if (status < B_OK) if (status < B_OK)
return status; return status;
WriteLocker _(inode->Lock());
// update the name only when they differ // update the name only when they differ
bool nameUpdated = false; bool nameUpdated = false;
if (strcmp(oldName, newName)) { if (strcmp(oldName, newName)) {