363,12 → 363,12 |
|
/* Truncate the file if requested and if necessary. */ |
if (oflag & O_TRUNC) { |
rwlock_write_lock(&node->contents_rwlock); |
futex_down(&node->contents_rwlock); |
if (node->size) { |
rc = vfs_truncate_internal(node->fs_handle, |
node->dev_handle, node->index, 0); |
if (rc) { |
rwlock_write_unlock(&node->contents_rwlock); |
futex_up(&node->contents_rwlock); |
vfs_node_put(node); |
ipc_answer_0(rid, rc); |
return; |
375,7 → 375,7 |
} |
node->size = 0; |
} |
rwlock_write_unlock(&node->contents_rwlock); |
futex_up(&node->contents_rwlock); |
} |
|
/* |