Changeset f57f8ea in mainline for uspace/srv/vfs/vfs_mount.c


Ignore:
Timestamp:
2008-01-02T20:25:24Z (17 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9413c0d
Parents:
215e375
Message:

Rename unlink_futex to namespace_futex and introduce a new futex for serializing
concurrent access to a VFS node's contents by multiple clients.

File:
1 edited

Legend:

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

    r215e375 rf57f8ea  
    155155        /*
    156156         * Lookup the root node of the filesystem being mounted.
    157          * In this case, we don't need to take the unlink_futex as the root node
    158          * cannot be removed. However, we do take a reference to it so that
    159          * we can track how many times it has been mounted.
     157         * In this case, we don't need to take the namespace_futex as the root
     158         * node cannot be removed. However, we do take a reference to it so
     159         * that we can track how many times it has been mounted.
    160160         */
    161161        int rc;
     
    183183                 * We already have the root FS.
    184184                 */
    185                 futex_down(&unlink_futex);
     185                futex_down(&namespace_futex);
    186186                rc = vfs_lookup_internal(buf, size, &mp, NULL);
    187187                if (rc != EOK) {
     
    189189                         * The lookup failed for some reason.
    190190                         */
    191                         futex_up(&unlink_futex);
     191                        futex_up(&namespace_futex);
    192192                        futex_up(&rootfs_futex);
    193193                        vfs_node_put(mr_node);  /* failed -> drop reference */
     
    198198                mp_node = vfs_node_get(&mp);
    199199                if (!mp_node) {
    200                         futex_up(&unlink_futex);
     200                        futex_up(&namespace_futex);
    201201                        futex_up(&rootfs_futex);
    202202                        vfs_node_put(mr_node);  /* failed -> drop reference */
     
    210210                 * This prevents the mount point from being deleted.
    211211                 */
    212                 futex_up(&unlink_futex);
     212                futex_up(&namespace_futex);
    213213        } else {
    214214                /*
Note: See TracChangeset for help on using the changeset viewer.