op->data = data;
op->invocation = invocation;
+ /* Need to disble app2ext whenever unmounting mmc */
+ if (operation == BLOCK_DEV_UNMOUNT &&
+ bdev->data->state == BLOCK_MOUNT &&
+ bdev->data->block_type == BLOCK_MMC_DEV &&
+ bdev->data->primary)
+ if (app2ext_disable_all_external_pkgs() < 0)
+ _E("app2ext_disable_all_external_pkgs() failed");
+
/* LOCK
* during adding queue and checking the queue length */
pthread_mutex_lock(&(th_manager[thread_id].mutex));
pthread_mutex_unlock(&(th_manager[thread_id].mutex));
/* UNLOCK */
- /* Need to disble app2ext whenever unmounting mmc */
- if (op->op == BLOCK_DEV_UNMOUNT &&
- bdev->data->state == BLOCK_MOUNT &&
- bdev->data->block_type == BLOCK_MMC_DEV &&
- bdev->data->primary)
- if (app2ext_disable_all_external_pkgs() < 0)
- _E("app2ext_disable_all_external_pkgs() failed");
-
-
if (!start_th) {
_D("Start New thread for block device");
th_manager[thread_id].start_th = true;