~martin-decky/helenos/rcu

« back to all changes in this revision

Viewing changes to uspace/srv/fs/exfat/exfat_fat.c

MergeĀ mainlineĀ changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
126
126
    aoff64_t bn, int flags)
127
127
{
128
128
        exfat_cluster_t firstc = nodep->firstc;
129
 
        exfat_cluster_t currc;
 
129
        exfat_cluster_t currc = 0;
130
130
        aoff64_t relbn = bn;
131
131
        int rc;
132
132
 
313
313
        for (clst = EXFAT_CLST_FIRST; clst < DATA_CNT(bs) + 2 && found < nclsts;
314
314
            clst++) {
315
315
                /* Need to rewrite because of multiple exfat_bitmap_get calls */
316
 
                if (bitmap_is_free(bs, service_id, clst) == EOK) {
 
316
                if (exfat_bitmap_is_free(bs, service_id, clst) == EOK) {
317
317
                        /*
318
318
                         * The cluster is free. Put it into our stack
319
319
                         * of found clusters and mark it as non-free.
324
324
                        if (rc != EOK)
325
325
                                goto exit_error;
326
326
                        found++;
327
 
                        rc = bitmap_set_cluster(bs, service_id, clst);
 
327
                        rc = exfat_bitmap_set_cluster(bs, service_id, clst);
328
328
                        if (rc != EOK)
329
329
                                goto exit_error;
330
330
 
345
345
 
346
346
        /* If something wrong - free the clusters */
347
347
        while (found--) {
348
 
                (void) bitmap_clear_cluster(bs, service_id, lifo[found]);
 
348
                (void) exfat_bitmap_clear_cluster(bs, service_id, lifo[found]);
349
349
                (void) exfat_set_cluster(bs, service_id, lifo[found], 0);
350
350
        }
351
351
 
377
377
                rc = exfat_set_cluster(bs, service_id, firstc, 0);
378
378
                if (rc != EOK)
379
379
                        return rc;
380
 
                rc = bitmap_clear_cluster(bs, service_id, firstc);
 
380
                rc = exfat_bitmap_clear_cluster(bs, service_id, firstc);
381
381
                if (rc != EOK)
382
382
                        return rc;
383
383
                firstc = nextc;