143,14 → 143,14 |
rc = ipc_data_write_start(phone, (void *)opts, |
str_size(opts)); |
if (rc != EOK) { |
async_wait_for(msg, NULL); |
vfs_release_phone(phone); |
async_wait_for(msg, NULL); |
fibril_rwlock_write_unlock(&namespace_rwlock); |
ipc_answer_0(rid, rc); |
return; |
} |
async_wait_for(msg, &rc); |
vfs_release_phone(phone); |
async_wait_for(msg, &rc); |
|
if (rc != EOK) { |
fibril_rwlock_write_unlock(&namespace_rwlock); |
197,7 → 197,6 |
|
int mountee_phone = vfs_grab_phone(fs_handle); |
assert(mountee_phone >= 0); |
vfs_release_phone(mountee_phone); |
|
phone = vfs_grab_phone(mp_res.triplet.fs_handle); |
msg = async_send_4(phone, VFS_MOUNT, |
209,8 → 208,9 |
/* send connection */ |
rc = async_req_1_0(phone, IPC_M_CONNECTION_CLONE, mountee_phone); |
if (rc != EOK) { |
async_wait_for(msg, NULL); |
vfs_release_phone(mountee_phone); |
vfs_release_phone(phone); |
async_wait_for(msg, NULL); |
/* Mount failed, drop reference to mp_node. */ |
if (mp_node) |
vfs_node_put(mp_node); |
218,12 → 218,14 |
fibril_rwlock_write_unlock(&namespace_rwlock); |
return; |
} |
|
vfs_release_phone(mountee_phone); |
|
/* send the mount options */ |
rc = ipc_data_write_start(phone, (void *)opts, str_size(opts)); |
if (rc != EOK) { |
async_wait_for(msg, NULL); |
vfs_release_phone(phone); |
async_wait_for(msg, NULL); |
/* Mount failed, drop reference to mp_node. */ |
if (mp_node) |
vfs_node_put(mp_node); |
231,8 → 233,8 |
ipc_answer_0(rid, rc); |
return; |
} |
async_wait_for(msg, &rc); |
vfs_release_phone(phone); |
async_wait_for(msg, &rc); |
|
if (rc == EOK) { |
rindex = (fs_index_t) IPC_GET_ARG1(answer); |
755,13 → 757,12 |
ipc_call_t answer; |
msg = async_send_2(fs_phone, IPC_GET_METHOD(*request), |
file->node->dev_handle, file->node->index, &answer); |
|
vfs_release_phone(fs_phone); |
|
/* Wait for reply from the FS server. */ |
ipcarg_t rc; |
async_wait_for(msg, &rc); |
|
|
vfs_release_phone(fs_phone); |
fibril_mutex_unlock(&file->lock); |
|
ipc_answer_1(rid, EOK, IPC_GET_ARG1(answer)); |
791,12 → 792,11 |
msg = async_send_2(fs_phone, IPC_GET_METHOD(*request), |
file->node->dev_handle, file->node->index, &answer); |
|
vfs_release_phone(fs_phone); |
|
/* Wait for reply from the FS server. */ |
ipcarg_t rc; |
async_wait_for(msg, &rc); |
|
vfs_release_phone(fs_phone); |
fibril_mutex_unlock(&file->lock); |
|
ipc_answer_0(rid, rc); |
818,7 → 818,6 |
* the same open file at a time. |
*/ |
fibril_mutex_lock(&file->lock); |
|
int fs_phone = vfs_grab_phone(file->node->fs_handle); |
|
/* Make a VFS_CLOSE request at the destination FS server. */ |
827,12 → 826,11 |
msg = async_send_2(fs_phone, IPC_GET_METHOD(*request), |
file->node->dev_handle, file->node->index, &answer); |
|
vfs_release_phone(fs_phone); |
|
/* Wait for reply from the FS server. */ |
ipcarg_t rc; |
async_wait_for(msg, &rc); |
|
|
vfs_release_phone(fs_phone); |
fibril_mutex_unlock(&file->lock); |
|
int retval = IPC_GET_ARG1(answer); |
923,12 → 921,12 |
*/ |
ipc_forward_fast(callid, fs_phone, 0, 0, 0, IPC_FF_ROUTE_FROM_ME); |
|
vfs_release_phone(fs_phone); |
|
/* Wait for reply from the FS server. */ |
ipcarg_t rc; |
async_wait_for(msg, &rc); |
|
vfs_release_phone(fs_phone); |
|
size_t bytes = IPC_GET_ARG1(answer); |
|
if (file->node->type == VFS_NODE_DIRECTORY) |