Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 7accfac in mainline


Ignore:
Timestamp:
2011-07-25T19:30:58Z (10 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master
Children:
b489f66
Parents:
6468072
Message:

unmount fix: remove the instance pointer from the list of instances, free the superblock reserved memory.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/fs/minixfs/mfs_ops.c

    r6468072 r7accfac  
    258258{
    259259        devmap_handle_t devmap = (devmap_handle_t) IPC_GET_ARG1(*request);
     260        struct mfs_instance *inst;
     261
     262        int r = mfs_instance_get(devmap, &inst);
     263        if (r != EOK) {
     264                async_answer_0(rid, r);
     265                return;
     266        }
    260267
    261268        (void) block_cache_fini(devmap);
    262269        block_fini(devmap);
     270
     271        /* Remove the instance from the list */
     272        fibril_mutex_lock(&inst_list_mutex);
     273        list_remove(&inst->link);
     274        fibril_mutex_unlock(&inst_list_mutex);
     275
     276        free(inst->sbi);
     277        free(inst);
    263278
    264279        async_answer_0(rid, EOK);
Note: See TracChangeset for help on using the changeset viewer.