Changeset 4a5f2b0 in mainline
- Timestamp:
- 2013-09-12T08:38:06Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c5396c1
- Parents:
- 64f3d3b (diff), 95027b5 (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_rw.c
r64f3d3b r4a5f2b0 104 104 bool write_mode, uint32_t w_block) 105 105 { 106 int r,nr_direct;106 int nr_direct; 107 107 int ptrs_per_block; 108 uint32_t *ind_zone, *ind2_zone; 108 uint32_t *ind_zone = NULL, *ind2_zone = NULL; 109 int r = EOK; 109 110 110 111 struct mfs_ino_info *ino_i = mnode->ino_i; … … 130 131 ino_i->dirty = true; 131 132 } 132 return EOK;133 goto out; 133 134 } 134 135 … … 142 143 r = alloc_zone_and_clear(inst, &zone); 143 144 if (r != EOK) 144 return r;145 goto out; 145 146 146 147 ino_i->i_izone[0] = zone; … … 149 150 /* Sparse block */ 150 151 *b = 0; 151 return EOK;152 goto out; 152 153 } 153 154 } … … 155 156 r = read_ind_zone(inst, ino_i->i_izone[0], &ind_zone); 156 157 if (r != EOK) 157 return r;158 goto out; 158 159 159 160 *b = ind_zone[rblock]; … … 163 164 } 164 165 165 goto out _free_ind1;166 goto out; 166 167 } 167 168 … … 176 177 r = alloc_zone_and_clear(inst, &zone); 177 178 if (r != EOK) 178 return r;179 goto out; 179 180 180 181 ino_i->i_izone[1] = zone; … … 183 184 /* Sparse block */ 184 185 *b = 0; 185 return EOK;186 goto out; 186 187 } 187 188 } … … 189 190 r = read_ind_zone(inst, ino_i->i_izone[1], &ind_zone); 190 191 if (r != EOK) 191 return r;192 goto out; 192 193 193 194 /* … … 203 204 r = alloc_zone_and_clear(inst, &zone); 204 205 if (r != EOK) 205 goto out _free_ind1;206 goto out; 206 207 207 208 ind_zone[ind2_off] = zone; … … 209 210 } else { 210 211 /* Sparse block */ 211 r = EOK;212 212 *b = 0; 213 goto out _free_ind1;213 goto out; 214 214 } 215 215 } … … 217 217 r = read_ind_zone(inst, ind_zone[ind2_off], &ind2_zone); 218 218 if (r != EOK) 219 goto out _free_ind1;219 goto out; 220 220 221 221 *b = ind2_zone[rblock - (ind2_off * ptrs_per_block)]; … … 225 225 } 226 226 227 r = EOK; 228 227 out: 229 228 free(ind2_zone); 230 out_free_ind1:231 229 free(ind_zone); 232 230 return r;
Note:
See TracChangeset
for help on using the changeset viewer.