Changeset e5f8762 in mainline for uspace/srv/fs/ext4fs/ext4fs_ops.c
- Timestamp:
- 2011-11-27T12:16:40Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d4d2954
- Parents:
- 5f6cb14
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/ext4fs/ext4fs_ops.c
r5f6cb14 re5f8762 469 469 // If directory - handle links from parent 470 470 if (lnk_count <= 1 && ext4fs_is_directory(cfn)) { 471 472 if (lnk_count) {473 lnk_count--;474 }475 476 471 ext4_inode_ref_t *parent_inode_ref = EXT4FS_NODE(pfn)->inode_ref; 477 472 … … 567 562 unsigned ext4fs_lnkcnt_get(fs_node_t *fn) 568 563 { 564 if (ext4fs_is_directory(fn)) { 565 if (lnkcnt > 1) { 566 EXT4FS_DBG("dir: returning \%u", 1); 567 return 1; 568 } else { 569 EXT4FS_DBG("dir: returning \%u", 0); 570 return 0; 571 } 572 } 573 574 // For regular files return real links count 569 575 ext4fs_node_t *enode = EXT4FS_NODE(fn); 570 576 return ext4_inode_get_links_count(enode->inode_ref->inode); … … 685 691 return rc; 686 692 } 687 ext4fs_node_t *enode = EXT4FS_NODE(root_node);688 693 689 694 /* Add instance to the list */ … … 694 699 *index = EXT4_INODE_ROOT_INDEX; 695 700 *size = 0; 696 *lnkcnt = ext4_inode_get_links_count(enode->inode_ref->inode);701 *lnkcnt = 1; 697 702 698 703 ext4fs_node_put(root_node);
Note:
See TracChangeset
for help on using the changeset viewer.