Changeset 84876aa4 in mainline for uspace/srv/volsrv/volume.c


Ignore:
Timestamp:
2019-11-15T13:46:34Z (4 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ecb7828
Parents:
b093a62 (diff), d548fc0 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge master into gfx

Mainly to get XCW fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/volsrv/volume.c

    rb093a62 r84876aa4  
    367367        if (refcount_down(&volume->refcnt)) {
    368368                /* No more references. Check if volume is persistent. */
    369                 if (!vol_volume_is_persist(volume)) {
    370                         list_remove(&volume->lvolumes);
    371                         vol_volume_delete(volume);
    372                 }
     369                list_remove(&volume->lvolumes);
     370                vol_volume_delete(volume);
    373371        }
    374372}
     
    399397                /* Volume is now persistent */
    400398                if (volume->nvolume == NULL) {
     399                        /* Prevent volume from being freed */
     400                        refcount_up(&volume->refcnt);
     401
    401402                        /* Create volume node */
    402403                        rc = sif_trans_begin(volume->volumes->repo, &trans);
     
    426427                        volume->nvolume = nvolume;
    427428                } else {
     429                        /* Allow volume to be freed */
     430                        vol_volume_del_ref(volume);
     431
    428432                        /* Update volume node */
    429433                        rc = sif_trans_begin(volume->volumes->repo, &trans);
Note: See TracChangeset for help on using the changeset viewer.