* 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:
parent
cc2da70688
commit
274e684a8e
@ -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)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user