Changeset 3908355 in mainline for uspace/srv/fs/mfs/mfs_ops.c


Ignore:
Timestamp:
2013-07-11T12:40:54Z (11 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
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.
Message:

merge from lp:mfs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/fs/mfs/mfs_ops.c

    rc8bb1633 r3908355  
    8888
    8989/* Hash table interface for open nodes hash table */
    90 
    9190typedef struct {
    9291        service_id_t service_id;
     
    190189                /* This is a V1 or V2 Minix filesystem */
    191190                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)) {
    193193                /* This is a V3 Minix filesystem */
    194194                magic = sb3->s_magic;
     
    345345        uint32_t inum;
    346346
    347         mfsdebug("%s()\n", __FUNCTION__);
    348 
    349347        r = mfs_instance_get(service_id, &inst);
    350348        if (r != EOK)
     
    379377                ino_i->i_mode = S_IFDIR;
    380378                ino_i->i_nlinks = 1; /* This accounts for the '.' dentry */
    381         } else
     379        } else {
    382380                ino_i->i_mode = S_IFREG;
     381                ino_i->i_nlinks = 0;
     382        }
    383383
    384384        ino_i->i_uid = 0;
     
    419419        free(ino_i);
    420420out_err:
     421        mfs_free_inode(inst, inum);
    421422        return r;
    422423}
     
    429430        struct mfs_dentry_info d_info;
    430431        int r;
    431 
    432         mfsdebug("%s()\n", __FUNCTION__);
    433432
    434433        if (!S_ISDIR(ino_i->i_mode))
     
    478477        struct mfs_instance *instance;
    479478
    480         mfsdebug("%s()\n", __FUNCTION__);
    481 
    482479        rc = mfs_instance_get(service_id, &instance);
    483480        if (rc != EOK)
     
    492489        int rc = EOK;
    493490        struct mfs_node *mnode = fsnode->data;
    494 
    495         mfsdebug("%s()\n", __FUNCTION__);
    496491
    497492        fibril_mutex_lock(&open_nodes_lock);
     
    554549        int rc;
    555550
    556         mfsdebug("%s()\n", __FUNCTION__);
    557 
    558551        fibril_mutex_lock(&open_nodes_lock);
    559552
     
    568561        if (already_open) {
    569562                mnode = hash_table_get_inst(already_open, struct mfs_node, link);
     563
    570564                *rfn = mnode->fsnode;
    571565                mnode->refcnt++;
     
    649643        bool destroy_dentry = false;
    650644
    651         mfsdebug("%s()\n", __FUNCTION__);
    652 
    653645        if (str_size(name) > sbi->max_name_len)
    654646                return ENAMETOOLONG;
     
    673665                r = mfs_insert_dentry(child, "..", parent->ino_i->index);
    674666                if (r != EOK) {
     667                        mfs_remove_dentry(child, ".");
    675668                        destroy_dentry = true;
    676669                        goto exit;
     
    700693        bool has_children;
    701694        int r;
    702 
    703         mfsdebug("%s()\n", __FUNCTION__);
    704695
    705696        if (!parent)
     
    924915               
    925916                r = mfs_write_map(mnode, pos, block, &dummy);
    926                 if (r != EOK)
     917                if (r != EOK) {
     918                        mfs_free_zone(mnode->instance, block);
    927919                        goto out_err;
     920                }
    928921
    929922                flags = BLOCK_FLAGS_NOREAD;
     
    965958mfs_destroy(service_id_t service_id, fs_index_t index)
    966959{
    967         fs_node_t *fn;
     960        fs_node_t *fn = NULL;
    968961        int r;
    969962
Note: See TracChangeset for help on using the changeset viewer.