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


Ignore:
Timestamp:
2013-07-11T19:13:37Z (11 years ago)
Author:
Manuele Conti <conti.ma@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
67632f7
Parents:
52ff62d3 (diff), 2b3e8840 (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 with mainline changes.

File:
1 edited

Legend:

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

    r52ff62d3 re6edc8d1  
    9090
    9191/* Hash table interface for open nodes hash table */
    92 
    9392typedef struct {
    9493        service_id_t service_id;
     
    192191                /* This is a V1 or V2 Minix filesystem */
    193192                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)) {
    195195                /* This is a V3 Minix filesystem */
    196196                magic = sb3->s_magic;
     
    347347        uint32_t inum;
    348348
    349         mfsdebug("%s()\n", __FUNCTION__);
    350 
    351349        r = mfs_instance_get(service_id, &inst);
    352350        if (r != EOK)
     
    381379                ino_i->i_mode = S_IFDIR;
    382380                ino_i->i_nlinks = 1; /* This accounts for the '.' dentry */
    383         } else
     381        } else {
    384382                ino_i->i_mode = S_IFREG;
     383                ino_i->i_nlinks = 0;
     384        }
    385385
    386386        ino_i->i_uid = 0;
     
    421421        free(ino_i);
    422422out_err:
     423        mfs_free_inode(inst, inum);
    423424        return r;
    424425}
     
    431432        struct mfs_dentry_info d_info;
    432433        int r;
    433 
    434         mfsdebug("%s()\n", __FUNCTION__);
    435434
    436435        if (!S_ISDIR(ino_i->i_mode))
     
    480479        struct mfs_instance *instance;
    481480
    482         mfsdebug("%s()\n", __FUNCTION__);
    483 
    484481        rc = mfs_instance_get(service_id, &instance);
    485482        if (rc != EOK)
     
    494491        int rc = EOK;
    495492        struct mfs_node *mnode = fsnode->data;
    496 
    497         mfsdebug("%s()\n", __FUNCTION__);
    498493
    499494        fibril_mutex_lock(&open_nodes_lock);
     
    556551        int rc;
    557552
    558         mfsdebug("%s()\n", __FUNCTION__);
    559 
    560553        fibril_mutex_lock(&open_nodes_lock);
    561554
     
    570563        if (already_open) {
    571564                mnode = hash_table_get_inst(already_open, struct mfs_node, link);
     565
    572566                *rfn = mnode->fsnode;
    573567                mnode->refcnt++;
     
    651645        bool destroy_dentry = false;
    652646
    653         mfsdebug("%s()\n", __FUNCTION__);
    654 
    655647        if (str_size(name) > sbi->max_name_len)
    656648                return ENAMETOOLONG;
     
    675667                r = mfs_insert_dentry(child, "..", parent->ino_i->index);
    676668                if (r != EOK) {
     669                        mfs_remove_dentry(child, ".");
    677670                        destroy_dentry = true;
    678671                        goto exit;
     
    702695        bool has_children;
    703696        int r;
    704 
    705         mfsdebug("%s()\n", __FUNCTION__);
    706697
    707698        if (!parent)
     
    926917               
    927918                r = mfs_write_map(mnode, pos, block, &dummy);
    928                 if (r != EOK)
     919                if (r != EOK) {
     920                        mfs_free_zone(mnode->instance, block);
    929921                        goto out_err;
     922                }
    930923
    931924                flags = BLOCK_FLAGS_NOREAD;
     
    967960mfs_destroy(service_id_t service_id, fs_index_t index)
    968961{
    969         fs_node_t *fn;
     962        fs_node_t *fn = NULL;
    970963        int r;
    971964
Note: See TracChangeset for help on using the changeset viewer.