Changes in uspace/srv/fs/exfat/exfat_ops.c [b33870b:7cede12c] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/exfat/exfat_ops.c
rb33870b r7cede12c 405 405 406 406 if (!nodep->fragmented) { 407 rc = bitmap_append_clusters(bs, nodep, clusters);407 rc = exfat_bitmap_append_clusters(bs, nodep, clusters); 408 408 if (rc != ENOSPC) 409 409 return rc; … … 411 411 nodep->fragmented = true; 412 412 nodep->dirty = true; /* need to sync node */ 413 rc = bitmap_replicate_clusters(bs, nodep);413 rc = exfat_bitmap_replicate_clusters(bs, nodep); 414 414 if (rc != EOK) 415 415 return rc; … … 457 457 458 458 clsts = prev_clsts - new_clsts; 459 rc = bitmap_free_clusters(bs, nodep, clsts);459 rc = exfat_bitmap_free_clusters(bs, nodep, clsts); 460 460 if (rc != EOK) 461 461 return rc; … … 657 657 return rc; 658 658 } 659 660 rc = exfat_zero_cluster(bs, service_id, nodep->firstc); 661 if (rc != EOK) { 662 (void) exfat_node_put(FS_NODE(nodep)); 663 return rc; 664 } 665 659 666 nodep->size = BPC(bs); 660 667 } else { … … 697 704 nodep->firstc); 698 705 else 699 rc = bitmap_free_clusters(bs, nodep,706 rc = exfat_bitmap_free_clusters(bs, nodep, 700 707 ROUND_UP(nodep->size, BPC(bs)) / BPC(bs)); 701 708 } … … 739 746 */ 740 747 rc = exfat_directory_write_file(&di, name); 741 if (rc != EOK) 742 return rc; 748 if (rc != EOK) { 749 (void) exfat_directory_close(&di); 750 fibril_mutex_unlock(&parentp->idx->lock); 751 return rc; 752 } 743 753 rc = exfat_directory_close(&di); 744 if (rc != EOK) 745 return rc; 754 if (rc != EOK) { 755 fibril_mutex_unlock(&parentp->idx->lock); 756 return rc; 757 } 746 758 747 759 fibril_mutex_unlock(&parentp->idx->lock); 748 if (rc != EOK)749 return rc;750 751 760 fibril_mutex_lock(&childp->idx->lock); 752 753 761 754 762 childp->idx->pfc = parentp->firstc; … … 1258 1266 exfat_directory_t di; 1259 1267 rc = exfat_directory_open(nodep, &di); 1260 if (rc != EOK) goto err; 1268 if (rc != EOK) 1269 goto err; 1270 1261 1271 rc = exfat_directory_seek(&di, pos); 1262 1272 if (rc != EOK) { … … 1268 1278 &df, &ds); 1269 1279 if (rc == EOK) 1270 goto hit; 1271 if (rc == ENOENT) 1272 goto miss; 1280 goto hit; 1281 else if (rc == ENOENT) 1282 goto miss; 1283 1284 (void) exfat_directory_close(&di); 1273 1285 1274 1286 err: … … 1279 1291 miss: 1280 1292 rc = exfat_directory_close(&di); 1281 if (rc !=EOK)1293 if (rc != EOK) 1282 1294 goto err; 1283 1295 rc = exfat_node_put(fn); … … 1397 1409 1398 1410 (void) async_data_write_finalize(callid, 1399 1411 b->data + pos % BPS(bs), bytes); 1400 1412 b->dirty = true; /* need to sync block */ 1401 1413 rc = block_put(b); … … 1447 1459 } 1448 1460 1449 (void) exfat_node_put(fn); 1461 int rc2 = exfat_node_put(fn); 1462 if (rc == EOK && rc2 != EOK) 1463 rc = rc2; 1464 1450 1465 return rc; 1451 1466 }
Note:
See TracChangeset
for help on using the changeset viewer.