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