Changeset 224174f in mainline for uspace/srv/fs/mfs/mfs_ops.c
- Timestamp:
- 2013-07-11T13:16:57Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2b3e8840, b2c96093
- Parents:
- 990ab7d (diff), 3a67d63 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/mfs/mfs_ops.c
r990ab7d r224174f 90 90 91 91 /* Hash table interface for open nodes hash table */ 92 93 92 typedef struct { 94 93 service_id_t service_id; … … 192 191 /* This is a V1 or V2 Minix filesystem */ 193 192 magic = sb->s_magic; 194 } else if (check_magic_number(sb3->s_magic, &native, &version, &longnames)) { 193 } else if (check_magic_number(sb3->s_magic, &native, 194 &version, &longnames)) { 195 195 /* This is a V3 Minix filesystem */ 196 196 magic = sb3->s_magic; … … 347 347 uint32_t inum; 348 348 349 mfsdebug("%s()\n", __FUNCTION__);350 351 349 r = mfs_instance_get(service_id, &inst); 352 350 if (r != EOK) … … 381 379 ino_i->i_mode = S_IFDIR; 382 380 ino_i->i_nlinks = 1; /* This accounts for the '.' dentry */ 383 } else 381 } else { 384 382 ino_i->i_mode = S_IFREG; 383 ino_i->i_nlinks = 0; 384 } 385 385 386 386 ino_i->i_uid = 0; … … 421 421 free(ino_i); 422 422 out_err: 423 mfs_free_inode(inst, inum); 423 424 return r; 424 425 } … … 431 432 struct mfs_dentry_info d_info; 432 433 int r; 433 434 mfsdebug("%s()\n", __FUNCTION__);435 434 436 435 if (!S_ISDIR(ino_i->i_mode)) … … 480 479 struct mfs_instance *instance; 481 480 482 mfsdebug("%s()\n", __FUNCTION__);483 484 481 rc = mfs_instance_get(service_id, &instance); 485 482 if (rc != EOK) … … 494 491 int rc = EOK; 495 492 struct mfs_node *mnode = fsnode->data; 496 497 mfsdebug("%s()\n", __FUNCTION__);498 493 499 494 fibril_mutex_lock(&open_nodes_lock); … … 556 551 int rc; 557 552 558 mfsdebug("%s()\n", __FUNCTION__);559 560 553 fibril_mutex_lock(&open_nodes_lock); 561 554 … … 570 563 if (already_open) { 571 564 mnode = hash_table_get_inst(already_open, struct mfs_node, link); 565 572 566 *rfn = mnode->fsnode; 573 567 mnode->refcnt++; … … 651 645 bool destroy_dentry = false; 652 646 653 mfsdebug("%s()\n", __FUNCTION__);654 655 647 if (str_size(name) > sbi->max_name_len) 656 648 return ENAMETOOLONG; … … 675 667 r = mfs_insert_dentry(child, "..", parent->ino_i->index); 676 668 if (r != EOK) { 669 mfs_remove_dentry(child, "."); 677 670 destroy_dentry = true; 678 671 goto exit; … … 702 695 bool has_children; 703 696 int r; 704 705 mfsdebug("%s()\n", __FUNCTION__);706 697 707 698 if (!parent) … … 926 917 927 918 r = mfs_write_map(mnode, pos, block, &dummy); 928 if (r != EOK) 919 if (r != EOK) { 920 mfs_free_zone(mnode->instance, block); 929 921 goto out_err; 922 } 930 923 931 924 flags = BLOCK_FLAGS_NOREAD; … … 967 960 mfs_destroy(service_id_t service_id, fs_index_t index) 968 961 { 969 fs_node_t *fn ;962 fs_node_t *fn = NULL; 970 963 int r; 971 964
Note:
See TracChangeset
for help on using the changeset viewer.