Changes in uspace/lib/ext4/libext4_ialloc.c [38542dc:2f591127] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/ext4/libext4_ialloc.c
r38542dc r2f591127 204 204 rc = block_get(&bitmap_block, fs->device, bitmap_block_addr, 205 205 BLOCK_FLAGS_NONE); 206 if (rc != EOK) 206 if (rc != EOK) { 207 ext4_filesystem_put_block_group_ref(bg_ref); 207 208 return rc; 209 } 208 210 209 211 /* Try to allocate i-node in the bitmap */ … … 215 217 /* Block group has not any free i-node */ 216 218 if (rc == ENOSPC) { 217 block_put(bitmap_block); 218 ext4_filesystem_put_block_group_ref(bg_ref); 219 rc = block_put(bitmap_block); 220 if (rc != EOK) { 221 ext4_filesystem_put_block_group_ref(bg_ref); 222 return rc; 223 } 224 225 rc = ext4_filesystem_put_block_group_ref(bg_ref); 226 if (rc != EOK) 227 return rc; 228 229 bgid++; 219 230 continue; 220 231 } … … 224 235 225 236 rc = block_put(bitmap_block); 226 if (rc != EOK) 237 if (rc != EOK) { 238 ext4_filesystem_put_block_group_ref(bg_ref); 227 239 return rc; 240 } 228 241 229 242 /* Modify filesystem counters */ … … 272 285 273 286 /* Block group not modified, put it and jump to the next block group */ 274 ext4_filesystem_put_block_group_ref(bg_ref); 287 rc = ext4_filesystem_put_block_group_ref(bg_ref); 288 if (rc != EOK) 289 return rc; 290 275 291 ++bgid; 276 292 }
Note:
See TracChangeset
for help on using the changeset viewer.