On Thu, Jun 23, 2016 at 09:01:53PM +0800, Anand Jain wrote:
> As of now we are calling blkdev_put() under call_rcu,
> actually which isn't necessary. Unless I am missing
> something. This is a try out patch to know the same.
Moving the blkdev_put after sync and invalidate, and out of the rcu
callback looks safe (and better) to me. Please create a helper for the
code that does
> + if (device->bdev && device->writeable) {
> + sync_blockdev(device->bdev);
> + invalidate_bdev(device->bdev);
> + }
> + if (device->bdev)
> + blkdev_put(device->bdev, device->mode);
It's repeated 3 times, justifies a helper.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html