Changeset 2f60a529 in mainline for uspace/srv/vfs/vfs_ops.c


Ignore:
Timestamp:
2008-03-28T07:54:14Z (17 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
5e790e6
Parents:
e190a89b
Message:

Return EBUSY if trying to mount something over an already mounted root FS.
(Contributed by Tim Post)

File:
1 edited

Legend:

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

    re190a89b r2f60a529  
    189189                /* We already have the root FS. */
    190190                rwlock_write_lock(&namespace_rwlock);
     191                if ((size == 1) && (buf[0] == '/')) {
     192                        /* Trying to mount root FS over root FS */
     193                        rwlock_write_unlock(&namespace_rwlock);
     194                        futex_up(&rootfs_futex);
     195                        vfs_node_put(mr_node);
     196                        free(buf);
     197                        ipc_answer_0(rid, EBUSY);
     198                        return;
     199                }
    191200                rc = vfs_lookup_internal(buf, L_DIRECTORY, &mp_res, NULL);
    192201                if (rc != EOK) {
Note: See TracChangeset for help on using the changeset viewer.