Changeset 7f59d6c in mainline
- Timestamp:
- 2017-03-18T13:08:17Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4f9ab1e
- Parents:
- 39c3b7f9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/vfs/vfs_ops.c
r39c3b7f9 r7f59d6c 552 552 /* Do not allow one path to be a prefix of the other. */ 553 553 if (old[shared] == 0 || new[shared] == 0) { 554 vfs_node_put(base); 554 555 return EINVAL; 555 556 } … … 564 565 rc = vfs_lookup_internal(base, old, L_DIRECTORY, &base_lr); 565 566 if (rc != EOK) { 567 vfs_node_put(base); 566 568 fibril_rwlock_write_unlock(&namespace_rwlock); 567 569 return rc; … … 573 575 old += shared; 574 576 new += shared; 577 } 578 579 rc = vfs_lookup_internal(base, old, L_DISABLE_MOUNTS, 580 &old_lr); 581 if (rc != EOK) { 582 vfs_node_put(base); 583 fibril_rwlock_write_unlock(&namespace_rwlock); 584 return rc; 575 585 } 576 586 … … 584 594 return rc; 585 595 } 586 596 597 rc = vfs_link_internal(base, new, &old_lr.triplet); 598 if (rc != EOK) { 599 vfs_link_internal(base, old, &old_lr.triplet); 600 if (orig_unlinked) { 601 vfs_link_internal(base, new, &new_lr_orig.triplet); 602 } 603 vfs_node_put(base); 604 fibril_rwlock_write_unlock(&namespace_rwlock); 605 return rc; 606 } 607 587 608 rc = vfs_lookup_internal(base, old, L_UNLINK | L_DISABLE_MOUNTS, 588 609 &old_lr); 589 610 if (rc != EOK) { 590 if (orig_unlinked) {591 vfs_link_internal(base, new, &new_lr_orig.triplet);592 }593 vfs_node_put(base);594 fibril_rwlock_write_unlock(&namespace_rwlock);595 return rc;596 }597 598 rc = vfs_link_internal(base, new, &old_lr.triplet);599 if (rc != EOK) {600 vfs_link_internal(base, old, &old_lr.triplet);601 611 if (orig_unlinked) { 602 612 vfs_link_internal(base, new, &new_lr_orig.triplet);
Note:
See TracChangeset
for help on using the changeset viewer.