Subversion Repositories HelenOS

Rev

Rev 2770 | Rev 2958 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2770 Rev 2788
Line 186... Line 186...
186
    vfs_lookup_res_t mp_res;
186
    vfs_lookup_res_t mp_res;
187
    futex_down(&rootfs_futex);
187
    futex_down(&rootfs_futex);
188
    if (rootfs.fs_handle) {
188
    if (rootfs.fs_handle) {
189
        /* We already have the root FS. */
189
        /* We already have the root FS. */
190
        rwlock_write_lock(&namespace_rwlock);
190
        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
        }
191
        rc = vfs_lookup_internal(buf, L_DIRECTORY, &mp_res, NULL);
200
        rc = vfs_lookup_internal(buf, L_DIRECTORY, &mp_res, NULL);
192
        if (rc != EOK) {
201
        if (rc != EOK) {
193
            /* The lookup failed for some reason. */
202
            /* The lookup failed for some reason. */
194
            rwlock_write_unlock(&namespace_rwlock);
203
            rwlock_write_unlock(&namespace_rwlock);
195
            futex_up(&rootfs_futex);
204
            futex_up(&rootfs_futex);