aboutsummaryrefslogtreecommitdiff
path: root/drivers/dma/idxd/cdev.c
diff options
context:
space:
mode:
authorGravatar Vinod Koul <vkoul@kernel.org> 2020-08-05 19:02:07 +0530
committerGravatar Vinod Koul <vkoul@kernel.org> 2020-08-05 19:02:07 +0530
commit0b5ad7b9522e6172342511fac6114fd8b7eb622a (patch)
treeb6a29560e6364bd98634564181cab54a3b6164a4 /drivers/dma/idxd/cdev.c
parentdmaengine: ioat setting ioat timeout as module parameter (diff)
parentdmaengine: dw: Don't include unneeded header to platform data header (diff)
downloadlinux-0b5ad7b9522e6172342511fac6114fd8b7eb622a.tar.gz
linux-0b5ad7b9522e6172342511fac6114fd8b7eb622a.tar.bz2
linux-0b5ad7b9522e6172342511fac6114fd8b7eb622a.zip
Merge branch 'for-linus' into fixes
Signed-off-by: Vinod Koul <vkoul@kernel.org> Conflicts: drivers/dma/idxd/sysfs.c
Diffstat (limited to 'drivers/dma/idxd/cdev.c')
-rw-r--r--drivers/dma/idxd/cdev.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/dma/idxd/cdev.c b/drivers/dma/idxd/cdev.c
index cb376cf6a2d2..c3976156db2f 100644
--- a/drivers/dma/idxd/cdev.c
+++ b/drivers/dma/idxd/cdev.c
@@ -115,6 +115,9 @@ static int idxd_cdev_release(struct inode *node, struct file *filep)
dev_dbg(dev, "%s called\n", __func__);
filep->private_data = NULL;
+ /* Wait for in-flight operations to complete. */
+ idxd_wq_drain(wq);
+
kfree(ctx);
mutex_lock(&wq->wq_lock);
idxd_wq_put(wq);