Changes in uspace/srv/vfs/vfs_node.c [79ae36dd:96b02eb9] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/vfs/vfs_node.c
r79ae36dd r96b02eb9 104 104 bool free_vfs_node = false; 105 105 bool free_fs_node = false; 106 107 fibril_mutex_lock(&nodes_mutex); 108 106 107 fibril_mutex_lock(&nodes_mutex); 109 108 if (node->refcnt-- == 1) { 110 111 109 /* 112 110 * We are dropping the last reference to this node. 113 111 * Remove it from the VFS node hash table. 114 112 */ 115 116 113 unsigned long key[] = { 117 114 [KEY_FS_HANDLE] = node->fs_handle, … … 119 116 [KEY_INDEX] = node->index 120 117 }; 121 122 118 hash_table_remove(&nodes, key, 3); 123 119 free_vfs_node = true; 124 125 120 if (!node->lnkcnt) 126 121 free_fs_node = true; 127 122 } 128 129 fibril_mutex_unlock(&nodes_mutex); 130 123 fibril_mutex_unlock(&nodes_mutex); 124 131 125 if (free_fs_node) { 132 133 /* 126 /* 134 127 * The node is not visible in the file system namespace. 135 128 * Free up its resources. 136 129 */ 137 138 async_exch_t *exch = vfs_exchange_grab(node->fs_handle); 139 sysarg_t rc = async_req_2_0(exch, VFS_OUT_DESTROY, 140 (sysarg_t) node->devmap_handle, (sysarg_t)node->index); 141 130 int phone = vfs_grab_phone(node->fs_handle); 131 sysarg_t rc; 132 rc = async_req_2_0(phone, VFS_OUT_DESTROY, 133 (sysarg_t)node->devmap_handle, (sysarg_t)node->index); 142 134 assert(rc == EOK); 143 vfs_ exchange_release(exch);135 vfs_release_phone(node->fs_handle, phone); 144 136 } 145 146 137 if (free_vfs_node) 147 138 free(node);
Note:
See TracChangeset
for help on using the changeset viewer.