Changeset 3908355 in mainline for uspace/srv/fs/mfs/mfs_ops.c
- Timestamp:
- 2013-07-11T12:40:54Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- dad0d2f
- Parents:
- c8bb1633 (diff), 1ba6651 (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
rc8bb1633 r3908355 88 88 89 89 /* Hash table interface for open nodes hash table */ 90 91 90 typedef struct { 92 91 service_id_t service_id; … … 190 189 /* This is a V1 or V2 Minix filesystem */ 191 190 magic = sb->s_magic; 192 } else if (check_magic_number(sb3->s_magic, &native, &version, &longnames)) { 191 } else if (check_magic_number(sb3->s_magic, &native, 192 &version, &longnames)) { 193 193 /* This is a V3 Minix filesystem */ 194 194 magic = sb3->s_magic; … … 345 345 uint32_t inum; 346 346 347 mfsdebug("%s()\n", __FUNCTION__);348 349 347 r = mfs_instance_get(service_id, &inst); 350 348 if (r != EOK) … … 379 377 ino_i->i_mode = S_IFDIR; 380 378 ino_i->i_nlinks = 1; /* This accounts for the '.' dentry */ 381 } else 379 } else { 382 380 ino_i->i_mode = S_IFREG; 381 ino_i->i_nlinks = 0; 382 } 383 383 384 384 ino_i->i_uid = 0; … … 419 419 free(ino_i); 420 420 out_err: 421 mfs_free_inode(inst, inum); 421 422 return r; 422 423 } … … 429 430 struct mfs_dentry_info d_info; 430 431 int r; 431 432 mfsdebug("%s()\n", __FUNCTION__);433 432 434 433 if (!S_ISDIR(ino_i->i_mode)) … … 478 477 struct mfs_instance *instance; 479 478 480 mfsdebug("%s()\n", __FUNCTION__);481 482 479 rc = mfs_instance_get(service_id, &instance); 483 480 if (rc != EOK) … … 492 489 int rc = EOK; 493 490 struct mfs_node *mnode = fsnode->data; 494 495 mfsdebug("%s()\n", __FUNCTION__);496 491 497 492 fibril_mutex_lock(&open_nodes_lock); … … 554 549 int rc; 555 550 556 mfsdebug("%s()\n", __FUNCTION__);557 558 551 fibril_mutex_lock(&open_nodes_lock); 559 552 … … 568 561 if (already_open) { 569 562 mnode = hash_table_get_inst(already_open, struct mfs_node, link); 563 570 564 *rfn = mnode->fsnode; 571 565 mnode->refcnt++; … … 649 643 bool destroy_dentry = false; 650 644 651 mfsdebug("%s()\n", __FUNCTION__);652 653 645 if (str_size(name) > sbi->max_name_len) 654 646 return ENAMETOOLONG; … … 673 665 r = mfs_insert_dentry(child, "..", parent->ino_i->index); 674 666 if (r != EOK) { 667 mfs_remove_dentry(child, "."); 675 668 destroy_dentry = true; 676 669 goto exit; … … 700 693 bool has_children; 701 694 int r; 702 703 mfsdebug("%s()\n", __FUNCTION__);704 695 705 696 if (!parent) … … 924 915 925 916 r = mfs_write_map(mnode, pos, block, &dummy); 926 if (r != EOK) 917 if (r != EOK) { 918 mfs_free_zone(mnode->instance, block); 927 919 goto out_err; 920 } 928 921 929 922 flags = BLOCK_FLAGS_NOREAD; … … 965 958 mfs_destroy(service_id_t service_id, fs_index_t index) 966 959 { 967 fs_node_t *fn ;960 fs_node_t *fn = NULL; 968 961 int r; 969 962
Note:
See TracChangeset
for help on using the changeset viewer.