diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2024-12-29 09:12:04 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-01-07 16:20:11 +0100 |
commit | 24edfbdedf19998366205130cfc93158a475497e (patch) | |
tree | 21deaaabbaec4a412e944d3a6907fb82bf7d38cf /fs | |
parent | fs: debugfs: differentiate short fops with proxy ops (diff) | |
download | linux-24edfbdedf19998366205130cfc93158a475497e.tar.xz linux-24edfbdedf19998366205130cfc93158a475497e.zip |
debugfs: fix missing mutex_destroy() in short_fops case
we need that in ->real_fops == NULL, ->short_fops != NULL case
Fixes: 8dc6d81c6b2a "debugfs: add small file operations for most files"
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Link: https://lore.kernel.org/r/20241229081223.3193228-1-viro@zeniv.linux.org.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/debugfs/inode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c index 65e46c7b6bf1..e752009de929 100644 --- a/fs/debugfs/inode.c +++ b/fs/debugfs/inode.c @@ -229,7 +229,7 @@ static void debugfs_release_dentry(struct dentry *dentry) return; /* check it wasn't a dir (no fsdata) or automount (no real_fops) */ - if (fsd && fsd->real_fops) { + if (fsd && (fsd->real_fops || fsd->short_fops)) { WARN_ON(!list_empty(&fsd->cancellations)); mutex_destroy(&fsd->cancellations_mtx); } |