Changeset 460514d in mainline


Ignore:
Timestamp:
2011-11-06T13:00:26Z (12 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4f100f4
Parents:
4af2f36
Message:

mount() should fail if there is not enough memory to add the respective entry to the mtab list

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/vfs/vfs_ops.c

    r4af2f36 r460514d  
    359359        fibril_mutex_unlock(&fs_list_lock);
    360360
    361         /* Do the mount */
    362         rc = vfs_mount_internal(rid, service_id, fs_handle, mp, opts);
    363         if (rc != EOK) {
    364                 async_answer_0(callid, ENOTSUP);
    365                 async_answer_0(rid, ENOTSUP);
    366                 free(mp);
    367                 free(opts);
    368                 free(fs_name);
    369                 return;
    370         }
    371 
    372361        /* Add the filesystem info to the list of mounted filesystems */
    373362        mtab_ent_t *mtab_ent = malloc(sizeof(mtab_ent_t));
     
    380369                return;
    381370        }
     371
     372        /* Do the mount */
     373        rc = vfs_mount_internal(rid, service_id, fs_handle, mp, opts);
     374        if (rc != EOK) {
     375                async_answer_0(callid, ENOTSUP);
     376                async_answer_0(rid, ENOTSUP);
     377                free(mtab_ent);
     378                free(mp);
     379                free(opts);
     380                free(fs_name);
     381                return;
     382        }
     383
     384        /* Add the filesystem info to the list of mounted filesystems */
    382385
    383386        str_cpy(mtab_ent->mp, MAX_PATH_LEN, mp);
Note: See TracChangeset for help on using the changeset viewer.