Changeset ce8c848 in mainline for uspace/srv/vfs/vfs_ops.c


Ignore:
Timestamp:
2010-01-25T22:26:16Z (14 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
bb0d3d24
Parents:
64af8f1 (diff), c888102 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge progress on the unmount feature.

File:
1 edited

Legend:

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

    r64af8f1 rce8c848  
    9292                }
    9393               
    94                 rc = vfs_lookup_internal(mp, L_DIRECTORY, &mp_res, NULL);
     94                rc = vfs_lookup_internal(mp, L_MP, &mp_res, NULL);
    9595                if (rc != EOK) {
    9696                        /* The lookup failed for some reason. */
     
    459459         * Lookup the mounted root and instantiate it.
    460460         */
    461         rc = vfs_lookup_internal(mp, L_NONE, &mr_res, NULL);
     461        rc = vfs_lookup_internal(mp, L_ROOT, &mr_res, NULL);
    462462        if (rc != EOK) {
    463463                fibril_rwlock_write_unlock(&namespace_rwlock);
     
    521521                 */
    522522
    523                 /*
    524                  * The L_NOCROSS_LAST_MP flag is essential if we really want to
    525                  * lookup the mount point and not the mounted root.
    526                  */
    527                 rc = vfs_lookup_internal(mp, L_NOCROSS_LAST_MP, &mp_res, NULL);
     523                rc = vfs_lookup_internal(mp, L_MP, &mp_res, NULL);
    528524                free(mp);
    529525                if (rc != EOK) {
     
    542538
    543539                phone = vfs_grab_phone(mp_node->fs_handle);
    544                 rc = async_req_2_0(phone, VFS_OUT_UNMOUNT, mp_node->fs_handle,
    545                     mp_node->dev_handle);
     540                rc = async_req_2_0(phone, VFS_OUT_UNMOUNT, mp_node->dev_handle,
     541                    mp_node->index);
    546542                vfs_release_phone(phone);
    547543                if (rc != EOK) {
     
    595591        /*
    596592         * Make sure that we are called with exactly one of L_FILE and
    597          * L_DIRECTORY. Make sure that the user does not pass L_OPEN or
    598          * L_NOCROSS_LAST_MP.
     593         * L_DIRECTORY. Make sure that the user does not pass L_OPEN,
     594         * L_ROOT or L_MP.
    599595         */
    600596        if (((lflag & (L_FILE | L_DIRECTORY)) == 0) ||
    601597            ((lflag & (L_FILE | L_DIRECTORY)) == (L_FILE | L_DIRECTORY)) ||
    602             (lflag & L_OPEN) || (lflag & L_NOCROSS_LAST_MP)) {
     598            (lflag & (L_OPEN | L_ROOT | L_MP))) {
    603599                ipc_answer_0(rid, EINVAL);
    604600                return;
Note: See TracChangeset for help on using the changeset viewer.