From: Dan Williams Date: Thu, 13 Apr 2017 04:59:01 +0000 (-0700) Subject: Merge branch 'for-4.11/libnvdimm' into for-4.12/dax X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=bfca9acf1a5df0ff98fbf47e363adb48612bb7ec;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git Merge branch 'for-4.11/libnvdimm' into for-4.12/dax --- bfca9acf1a5df0ff98fbf47e363adb48612bb7ec diff --cc drivers/dax/dax.c index e5f85550dc25,806f180c80d8..19795eb35579 --- a/drivers/dax/dax.c +++ b/drivers/dax/dax.c @@@ -685,19 -718,10 +713,19 @@@ static void kill_dax_dev(struct dax_de * upon seeing dax_dev->alive == false. */ dax_dev->alive = false; - synchronize_rcu(); + synchronize_srcu(&dax_srcu); unmap_mapping_range(dax_dev->inode->i_mapping, 0, 0, 1); - cdev_del(cdev); - device_unregister(dev); +} + +static void unregister_dax_dev(void *dev) +{ + struct dax_dev *dax_dev = to_dax_dev(dev); + + dev_dbg(dev, "%s\n", __func__); + + kill_dax_dev(dax_dev); + cdev_device_del(&dax_dev->cdev, dev); + put_device(dev); } struct dax_dev *devm_create_dax_dev(struct dax_region *dax_region,