We don't need to take the mutex and zero out wr_cur_bio, as this is
called after the scrub finished.
Reviewed-by: Liu Bo <bo.li.liu@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
if (!sctx)
return;
- mutex_lock(&sctx->wr_ctx.wr_lock);
- kfree(sctx->wr_ctx.wr_curr_bio);
- sctx->wr_ctx.wr_curr_bio = NULL;
- mutex_unlock(&sctx->wr_ctx.wr_lock);
-
/* this can happen when scrub is cancelled */
if (sctx->curr != -1) {
struct scrub_bio *sbio = sctx->bios[sctx->curr];
kfree(sbio);
}
+ kfree(sctx->wr_ctx.wr_curr_bio);
scrub_free_csums(sctx);
kfree(sctx);
}