Changeset 498ced1 in mainline for uspace/srv/volsrv/volume.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/volume.c
rb13d80b r498ced1 83 83 } 84 84 85 atomic_set(&volume->refcnt, 1);85 refcount_init(&volume->refcnt); 86 86 link_initialize(&volume->lvolumes); 87 87 volume->volumes = NULL; … … 245 245 str_size(label) > 0) { 246 246 /* Add reference */ 247 atomic_inc(&volume->refcnt);247 refcount_up(&volume->refcnt); 248 248 *rvolume = volume; 249 249 return EOK; … … 309 309 void vol_volume_del_ref(vol_volume_t *volume) 310 310 { 311 if ( atomic_predec(&volume->refcnt) == 0) {311 if (refcount_down(&volume->refcnt)) { 312 312 /* No more references. Check if volume is persistent. */ 313 313 if (!vol_volume_is_persist(volume)) {
Note:
See TracChangeset
for help on using the changeset viewer.