Skip to content

Commit 24edfbd

Browse files
Al Virogregkh
authored andcommitted
debugfs: fix missing mutex_destroy() in short_fops case
we need that in ->real_fops == NULL, ->short_fops != NULL case Fixes: 8dc6d81 "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>
1 parent f8f2589 commit 24edfbd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/debugfs/inode.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ static void debugfs_release_dentry(struct dentry *dentry)
229229
return;
230230

231231
/* check it wasn't a dir (no fsdata) or automount (no real_fops) */
232-
if (fsd && fsd->real_fops) {
232+
if (fsd && (fsd->real_fops || fsd->short_fops)) {
233233
WARN_ON(!list_empty(&fsd->cancellations));
234234
mutex_destroy(&fsd->cancellations_mtx);
235235
}

0 commit comments

Comments
 (0)