Fix exported object cleanup in case of cache stop failure
In case of error during cache stop exported object is not being restored after destroying. This may result in bug in case of calling stop once more. This commit fixes this issue - exported objects are restored. Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
This commit is contained in:
@@ -724,7 +724,10 @@ int casdsk_exp_obj_destroy(struct casdsk_disk *dsk)
|
||||
struct casdsk_exp_obj *exp_obj;
|
||||
|
||||
BUG_ON(!dsk);
|
||||
BUG_ON(!dsk->exp_obj);
|
||||
|
||||
if (!dsk->exp_obj)
|
||||
return -ENODEV;
|
||||
|
||||
BUG_ON(!dsk->exp_obj->locked_bd);
|
||||
|
||||
CASDSK_DEBUG_DISK_TRACE(dsk);
|
||||
|
Reference in New Issue
Block a user