Changeset 1a9174e in mainline for uspace/srv/volsrv/volsrv.c
- Timestamp:
- 2018-06-29T15:35:50Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d3b2ffa
- Parents:
- 72c72d4
- git-author:
- Jiri Svoboda <jiri@…> (2018-06-28 18:34:52)
- git-committer:
- Jiri Svoboda <jiri@…> (2018-06-29 15:35:50)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/volsrv/volsrv.c
r72c72d4 r1a9174e 144 144 log_msg(LOG_DEFAULT, LVL_DEBUG, "vol_part_info_srv(%zu)", 145 145 sid); 146 rc = vol_part_find_by_id (sid, &part);146 rc = vol_part_find_by_id_ref(sid, &part); 147 147 if (rc != EOK) { 148 148 async_answer_0(icall_handle, ENOENT); … … 153 153 if (rc != EOK) { 154 154 async_answer_0(icall_handle, EIO); 155 return;155 goto error; 156 156 } 157 157 … … 161 161 async_answer_0(chandle, EREFUSED); 162 162 async_answer_0(icall_handle, EREFUSED); 163 return;163 goto error; 164 164 } 165 165 … … 167 167 async_answer_0(chandle, EINVAL); 168 168 async_answer_0(icall_handle, EINVAL); 169 return;169 goto error; 170 170 } 171 171 … … 175 175 async_answer_0(chandle, rc); 176 176 async_answer_0(icall_handle, rc); 177 return; 178 } 179 180 async_answer_0(icall_handle, EOK); 177 goto error; 178 } 179 180 async_answer_0(icall_handle, EOK); 181 error: 182 vol_part_del_ref(part); 181 183 } 182 184 … … 190 192 log_msg(LOG_DEFAULT, LVL_DEBUG, "vol_part_eject_srv(%zu)", sid); 191 193 192 rc = vol_part_find_by_id (sid, &part);194 rc = vol_part_find_by_id_ref(sid, &part); 193 195 if (rc != EOK) { 194 196 async_answer_0(icall_handle, ENOENT); 195 return;197 goto error; 196 198 } 197 199 … … 199 201 if (rc != EOK) { 200 202 async_answer_0(icall_handle, EIO); 201 return; 202 } 203 204 async_answer_0(icall_handle, EOK); 203 goto error; 204 } 205 206 async_answer_0(icall_handle, EOK); 207 error: 208 vol_part_del_ref(part); 205 209 } 206 210 … … 214 218 log_msg(LOG_DEFAULT, LVL_DEBUG, "vol_part_empty_srv(%zu)", sid); 215 219 216 rc = vol_part_find_by_id (sid, &part);220 rc = vol_part_find_by_id_ref(sid, &part); 217 221 if (rc != EOK) { 218 222 async_answer_0(icall_handle, ENOENT); … … 223 227 if (rc != EOK) { 224 228 async_answer_0(icall_handle, EIO); 225 return; 226 } 227 228 async_answer_0(icall_handle, EOK); 229 goto error; 230 } 231 232 async_answer_0(icall_handle, EOK); 233 error: 234 vol_part_del_ref(part); 229 235 } 230 236 … … 292 298 } 293 299 294 rc = vol_part_find_by_id (sid, &part);300 rc = vol_part_find_by_id_ref(sid, &part); 295 301 if (rc != EOK) { 296 302 free(label); … … 303 309 free(label); 304 310 async_answer_0(icall_handle, rc); 311 vol_part_del_ref(part); 305 312 return; 306 313 }
Note:
See TracChangeset
for help on using the changeset viewer.