Commit 9a797e0
mtd: mtdswap: remove debugfs stats file on teardown
[ Upstream commit 66fb313 ]
mtdswap_add_debugfs() creates an mtdswap_stats debugfs file under the
per-MTD debugfs directory, but mtdswap_remove_dev() never removes it
before freeing the mtdswap_dev.
Store the returned dentry and remove it during device teardown before the
driver-private state is freed.
Fixes: a321590 ("mtd: Add mtdswap block driver")
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>1 parent dfa535c commit 9a797e0
1 file changed
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| 128 | + | |
128 | 129 | | |
129 | 130 | | |
130 | 131 | | |
| |||
1262 | 1263 | | |
1263 | 1264 | | |
1264 | 1265 | | |
1265 | | - | |
| 1266 | + | |
| 1267 | + | |
1266 | 1268 | | |
1267 | 1269 | | |
1268 | 1270 | | |
| |||
1463 | 1465 | | |
1464 | 1466 | | |
1465 | 1467 | | |
| 1468 | + | |
1466 | 1469 | | |
1467 | 1470 | | |
1468 | 1471 | | |
| |||
0 commit comments