Changeset 4098e38 in mainline for uspace/srv/fs/fat/fat_ops.c
- Timestamp:
- 2009-09-21T15:28:11Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4b4668e
- Parents:
- f6b5593
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/fat/fat_ops.c
rf6b5593 r4098e38 78 78 } 79 79 80 static voidfat_node_sync(fat_node_t *node)80 static int fat_node_sync(fat_node_t *node) 81 81 { 82 82 block_t *b; … … 96 96 rc = _fat_block_get(&b, bs, node->idx->dev_handle, node->idx->pfc, 97 97 (node->idx->pdi * sizeof(fat_dentry_t)) / bps, BLOCK_FLAGS_NONE); 98 assert(rc == EOK); 98 if (rc != EOK) 99 return rc; 99 100 100 101 d = ((fat_dentry_t *)b->data) + (node->idx->pdi % dps); … … 111 112 b->dirty = true; /* need to sync block */ 112 113 rc = block_put(b); 113 assert(rc == EOK);114 return rc; 114 115 } 115 116 … … 118 119 fs_node_t *fn; 119 120 fat_node_t *nodep; 121 int rc; 120 122 121 123 fibril_mutex_lock(&ffn_mutex); … … 133 135 list_remove(&nodep->ffn_link); 134 136 fibril_mutex_unlock(&ffn_mutex); 135 if (nodep->dirty) 136 fat_node_sync(nodep); 137 if (nodep->dirty) { 138 rc = fat_node_sync(nodep); 139 assert(rc == EOK); 140 } 137 141 idxp_tmp->nodep = NULL; 138 142 fibril_mutex_unlock(&nodep->lock);
Note:
See TracChangeset
for help on using the changeset viewer.