]> git.baikalelectronics.ru Git - kernel.git/commit
swiotlb: fix passing local variable to debugfs_create_ulong()
authorTianyu Lan <tiala@microsoft.com>
Thu, 28 Jul 2022 07:24:20 +0000 (03:24 -0400)
committerChristoph Hellwig <hch@lst.de>
Thu, 28 Jul 2022 14:23:30 +0000 (07:23 -0700)
commit35fddb65c9fadb1fc81bb5ba88bbb3b650f39bb8
treed567d8722178f5759f98f1b32e528dcb768cc3a3
parent25700be3740ab321c158c132c7ab2296f93e1921
swiotlb: fix passing local variable to debugfs_create_ulong()

Debugfs node will be run-timely checked and so local variable
should be not passed to debugfs_create_ulong(). Fix it via
debugfs_create_file() to create io_tlb_used node and calculate
used io tlb number with fops_io_tlb_used attribute.

Fixes: e458adef91f3 ("swiotlb: split up the global swiotlb lock")
Signed-off-by: Tianyu Lan <tiala@microsoft.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
kernel/dma/swiotlb.c