Changeset 498ced1 in mainline for uspace/srv/volsrv/part.c
- Timestamp:
- 2018-08-11T02:43:32Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 05882233
- Parents:
- b13d80b
- git-author:
- Jiří Zárevúcky <jiri.zarevucky@…> (2018-08-11 02:29:02)
- git-committer:
- Jiří Zárevúcky <jiri.zarevucky@…> (2018-08-11 02:43:32)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/volsrv/part.c
rb13d80b r498ced1 179 179 } 180 180 181 atomic_set(&part->refcnt, 1);181 refcount_init(&part->refcnt); 182 182 link_initialize(&part->lparts); 183 183 part->parts = NULL; … … 524 524 if (part->svc_id == sid) { 525 525 /* Add reference */ 526 atomic_inc(&part->refcnt);526 refcount_up(&part->refcnt); 527 527 *rpart = part; 528 528 return EOK; … … 547 547 void vol_part_del_ref(vol_part_t *part) 548 548 { 549 if ( atomic_predec(&part->refcnt) == 0)549 if (refcount_down(&part->refcnt)) 550 550 vol_part_delete(part); 551 551 }
Note:
See TracChangeset
for help on using the changeset viewer.