diff options
author | Dave Jiang <dave.jiang@intel.com> | 2020-04-13 20:40:12 +0300 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2020-04-27 18:56:23 +0300 |
commit | 0821009445a8261ac4d32a6df4b83938e007c765 (patch) | |
tree | d59ad9425d0c1860538d3ce6173ab4ba2d570d49 /fs/ocfs2/inode.c | |
parent | 0c89446379218698189a47871336cb30286a7197 (diff) | |
download | linux-0821009445a8261ac4d32a6df4b83938e007c765.tar.xz |
dmaengine: fix channel index enumeration
When the channel register code was changed to allow hotplug operations,
dynamic indexing wasn't taken into account. When channels are randomly
plugged and unplugged out of order, the serial indexing breaks. Convert
channel indexing to using IDA tracking in order to allow dynamic
assignment. The previous code does not cause any regression bug for
existing channel allocation besides idxd driver since the hotplug usage
case is only used by idxd at this point.
With this change, the chan->idr_ref is also not needed any longer. We can
have a device with no channels registered due to hot plug. The channel
device release code no longer should attempt to free the dma device id on
the last channel release.
Fixes: e81274cd6b52 ("dmaengine: add support to dynamic register/unregister of channels")
Reported-by: Yixin Zhang <yixin.zhang@intel.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Tested-by: Yixin Zhang <yixin.zhang@intel.com>
Link: https://lore.kernel.org/r/158679961260.7674.8485924270472851852.stgit@djiang5-desk3.ch.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'fs/ocfs2/inode.c')
0 files changed, 0 insertions, 0 deletions