Changeset b17186d in mainline for uspace/srv/vfs/vfs_node.c


Ignore:
Timestamp:
2008-11-29T15:39:24Z (16 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
dfd77382
Parents:
abd36f7
Message:

Hold the namespace_rwlock during readdir().

File:
1 edited

Legend:

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

    rabd36f7 rb17186d  
    176176                node->size = result->size;
    177177                node->lnkcnt = result->lnkcnt;
     178                node->type = result->type;
    178179                link_initialize(&node->nh_link);
    179180                rwlock_initialize(&node->contents_rwlock);
     
    181182        } else {
    182183                node = hash_table_get_instance(tmp, vfs_node_t, nh_link);       
     184                if (node->type == VFS_NODE_UNKNOWN &&
     185                    result->type != VFS_NODE_UNKNOWN) {
     186                        /* Upgrade the node type. */
     187                        node->type = result->type;
     188                }
    183189        }
    184190
    185191        assert(node->size == result->size);
    186192        assert(node->lnkcnt == result->lnkcnt);
     193        assert(node->type == result->type || result->type == VFS_NODE_UNKNOWN);
    187194
    188195        _vfs_node_addref(node);
Note: See TracChangeset for help on using the changeset viewer.