Changeset 0773396 in mainline for uspace/srv/fs/mfs/mfs_rw.c


Ignore:
Timestamp:
2013-12-25T13:05:25Z (10 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
bc54126c
Parents:
f4a47e52 (diff), 6946f23 (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 mainline changes

File:
1 edited

Legend:

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

    rf4a47e52 r0773396  
    104104    bool write_mode, uint32_t w_block)
    105105{
    106         int r, nr_direct;
     106        int nr_direct;
    107107        int ptrs_per_block;
    108         uint32_t *ind_zone, *ind2_zone;
     108        uint32_t *ind_zone = NULL, *ind2_zone = NULL;
     109        int r = EOK;
    109110
    110111        struct mfs_ino_info *ino_i = mnode->ino_i;
     
    130131                        ino_i->dirty = true;
    131132                }
    132                 return EOK;
     133                goto out;
    133134        }
    134135
     
    142143                                r = alloc_zone_and_clear(inst, &zone);
    143144                                if (r != EOK)
    144                                         return r;
     145                                        goto out;
    145146
    146147                                ino_i->i_izone[0] = zone;
     
    149150                                /* Sparse block */
    150151                                *b = 0;
    151                                 return EOK;
     152                                goto out;
    152153                        }
    153154                }
     
    155156                r = read_ind_zone(inst, ino_i->i_izone[0], &ind_zone);
    156157                if (r != EOK)
    157                         return r;
     158                        goto out;
    158159
    159160                *b = ind_zone[rblock];
     
    163164                }
    164165
    165                 goto out_free_ind1;
     166                goto out;
    166167        }
    167168
     
    176177                        r = alloc_zone_and_clear(inst, &zone);
    177178                        if (r != EOK)
    178                                 return r;
     179                                goto out;
    179180
    180181                        ino_i->i_izone[1] = zone;
     
    183184                        /* Sparse block */
    184185                        *b = 0;
    185                         return EOK;
     186                        goto out;
    186187                }
    187188        }
     
    189190        r = read_ind_zone(inst, ino_i->i_izone[1], &ind_zone);
    190191        if (r != EOK)
    191                 return r;
     192                goto out;
    192193
    193194        /*
     
    203204                        r = alloc_zone_and_clear(inst, &zone);
    204205                        if (r != EOK)
    205                                 goto out_free_ind1;
     206                                goto out;
    206207
    207208                        ind_zone[ind2_off] = zone;
     
    209210                } else {
    210211                        /* Sparse block */
    211                         r = EOK;
    212212                        *b = 0;
    213                         goto out_free_ind1;
     213                        goto out;
    214214                }
    215215        }
     
    217217        r = read_ind_zone(inst, ind_zone[ind2_off], &ind2_zone);
    218218        if (r != EOK)
    219                 goto out_free_ind1;
     219                goto out;
    220220
    221221        *b = ind2_zone[rblock - (ind2_off * ptrs_per_block)];
     
    225225        }
    226226
    227         r = EOK;
    228 
     227out:
    229228        free(ind2_zone);
    230 out_free_ind1:
    231229        free(ind_zone);
    232230        return r;
Note: See TracChangeset for help on using the changeset viewer.