Changeset c91f2d1b in mainline for uspace/srv/fs/fat/fat_ops.c
- Timestamp:
- 2009-08-27T18:31:27Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- cd688d9
- Parents:
- 02ee6bf5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/fat/fat_ops.c
r02ee6bf5 rc91f2d1b 85 85 uint16_t bps; 86 86 unsigned dps; 87 int rc; 87 88 88 89 assert(node->dirty); … … 108 109 109 110 b->dirty = true; /* need to sync block */ 110 block_put(b); 111 rc = block_put(b); 112 assert(rc == EOK); 111 113 } 112 114 … … 170 172 unsigned spc; 171 173 unsigned dps; 174 int rc; 172 175 173 176 if (idxp->nodep) { … … 226 229 nodep->refcnt = 1; 227 230 228 block_put(b); 231 rc = block_put(b); 232 assert(rc == EOK); 229 233 230 234 /* Link the idx structure with the node structure. */ … … 443 447 } 444 448 } 445 block_put(b); 449 rc = block_put(b); 450 assert(rc == EOK); 446 451 } 447 452 j = 0; … … 477 482 fat_dentry_name_set(d, name); 478 483 b->dirty = true; /* need to sync block */ 479 block_put(b); 484 rc = block_put(b); 485 assert(rc == EOK); 480 486 fibril_mutex_unlock(&parentp->idx->lock); 481 487 … … 512 518 } 513 519 b->dirty = true; /* need to sync block */ 514 block_put(b); 520 rc = block_put(b); 521 assert(rc == EOK); 515 522 516 523 childp->idx->pfc = parentp->firstc; … … 539 546 uint16_t bps; 540 547 block_t *b; 548 int rc; 541 549 542 550 if (!parentp) … … 561 569 d->name[0] = FAT_DENTRY_ERASED; 562 570 b->dirty = true; /* need to sync block */ 563 block_put(b); 571 rc = block_put(b); 572 assert(rc == EOK); 564 573 565 574 /* remove the index structure from the position hash */ … … 588 597 fat_dentry_t *d; 589 598 block_t *b; 599 int rc; 590 600 591 601 fibril_mutex_lock(&parentp->idx->lock); … … 603 613 continue; 604 614 case FAT_DENTRY_LAST: 605 block_put(b); 615 rc = block_put(b); 616 assert(rc == EOK); 606 617 fibril_mutex_unlock(&parentp->idx->lock); 607 618 return NULL; … … 629 640 * run out of 32-bit indices. 630 641 */ 631 block_put(b); 642 rc = block_put(b); 643 assert(rc == EOK); 632 644 return NULL; 633 645 } 634 646 nodep = fat_node_get_core(idx); 635 647 fibril_mutex_unlock(&idx->lock); 636 block_put(b); 648 rc = block_put(b); 649 assert(rc == EOK); 637 650 return FS_NODE(nodep); 638 651 } 639 652 } 640 block_put(b); 653 rc = block_put(b); 654 assert(rc == EOK); 641 655 } 642 656 … … 669 683 block_t *b; 670 684 unsigned i, j; 685 int rc; 671 686 672 687 if (nodep->type != FAT_DIRECTORY) … … 691 706 continue; 692 707 case FAT_DENTRY_LAST: 693 block_put(b); 708 rc = block_put(b); 709 assert(rc == EOK); 694 710 fibril_mutex_unlock(&nodep->idx->lock); 695 711 return false; 696 712 default: 697 713 case FAT_DENTRY_VALID: 698 block_put(b); 714 rc = block_put(b); 715 assert(rc == EOK); 699 716 fibril_mutex_unlock(&nodep->idx->lock); 700 717 return true; 701 718 } 702 block_put(b); 719 rc = block_put(b); 720 assert(rc == EOK); 703 721 fibril_mutex_unlock(&nodep->idx->lock); 704 722 return true; 705 723 } 706 block_put(b); 724 rc = block_put(b); 725 assert(rc == EOK); 707 726 } 708 727 … … 901 920 size_t bytes; 902 921 block_t *b; 922 int rc; 903 923 904 924 if (!fn) { … … 937 957 (void) ipc_data_read_finalize(callid, b->data + pos % bps, 938 958 bytes); 939 block_put(b); 959 rc = block_put(b); 960 assert(rc == EOK); 940 961 } 941 962 } else { … … 969 990 continue; 970 991 case FAT_DENTRY_LAST: 971 block_put(b); 992 rc = block_put(b); 993 assert(rc == EOK); 972 994 goto miss; 973 995 default: 974 996 case FAT_DENTRY_VALID: 975 997 fat_dentry_name_get(d, name); 976 block_put(b); 998 rc == block_put(b); 999 assert(rc == EOK); 977 1000 goto hit; 978 1001 } 979 1002 } 980 block_put(b); 1003 rc = block_put(b); 1004 assert(rc == EOK); 981 1005 bnum++; 982 1006 } … … 1010 1034 off_t boundary; 1011 1035 int flags = BLOCK_FLAGS_NONE; 1036 int rc; 1012 1037 1013 1038 if (!fn) { … … 1055 1080 bytes); 1056 1081 b->dirty = true; /* need to sync block */ 1057 block_put(b); 1082 rc = block_put(b); 1083 assert(rc == EOK); 1058 1084 if (pos + bytes > nodep->size) { 1059 1085 nodep->size = pos + bytes; … … 1089 1115 bytes); 1090 1116 b->dirty = true; /* need to sync block */ 1091 block_put(b); 1117 rc = block_put(b); 1118 assert(rc == EOK); 1092 1119 /* 1093 1120 * Append the cluster chain starting in mcl to the end of the
Note:
See TracChangeset
for help on using the changeset viewer.