Changeset d91d076 in mainline
- Timestamp:
- 2025-05-23T21:38:48Z (4 weeks ago)
- Children:
- c44b399
- Parents:
- f62c901
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/ext4/src/ops.c
rf62c901 rd91d076 65 65 static errno_t ext4_instance_get(service_id_t, ext4_instance_t **); 66 66 static errno_t handle_sparse_or_unallocated_fblock(ext4_filesystem_t *, 67 ext4_inode_ref_t *, uint32_t, uint32_t, uint32_t *, int * );67 ext4_inode_ref_t *, uint32_t, uint32_t, uint32_t *, int *, bool *); 68 68 69 69 /* Forward declarations of ext4 libfs operations. */ … … 1288 1288 fs_node_t *fn; 1289 1289 errno_t rc2; 1290 bool fblock_allocated = false; 1291 1290 1292 errno_t rc = ext4_node_get(&fn, service_id, index); 1291 1293 if (rc != EOK) … … 1327 1329 if (fblock == 0) { 1328 1330 rc = handle_sparse_or_unallocated_fblock(fs, inode_ref, 1329 block_size, iblock, &fblock, &flags );1331 block_size, iblock, &fblock, &flags, &fblock_allocated); 1330 1332 if (rc != EOK) { 1331 1333 async_answer_0(&call, rc); … … 1370 1372 1371 1373 exit: 1374 if (rc != EOK && fblock_allocated) 1375 ext4_balloc_free_block(inode_ref, fblock); 1376 1372 1377 rc2 = ext4_node_put(fn); 1373 1378 return rc == EOK ? rc2 : rc; … … 1382 1387 * @param fblock Place to store allocated block address 1383 1388 * @param flags BLOCK_FLAGS to update 1389 * @param allocated Place to store whether new block was allocated 1384 1390 * 1385 1391 * @return Error code … … 1388 1394 static errno_t handle_sparse_or_unallocated_fblock(ext4_filesystem_t *fs, 1389 1395 ext4_inode_ref_t *inode_ref, uint32_t block_size, uint32_t iblock, 1390 uint32_t *fblock, int *flags )1396 uint32_t *fblock, int *flags, bool *allocated) 1391 1397 { 1392 1398 errno_t rc; … … 1422 1428 return rc; 1423 1429 } 1430 1431 *allocated = true; 1424 1432 } 1425 1433
Note:
See TracChangeset
for help on using the changeset viewer.