Commit 24edfbde authored by Al Viro's avatar Al Viro Committed by Greg Kroah-Hartman
Browse files

debugfs: fix missing mutex_destroy() in short_fops case



we need that in ->real_fops == NULL, ->short_fops != NULL case

Fixes: 8dc6d81c "debugfs: add small file operations for most files"
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Link: https://lore.kernel.org/r/20241229081223.3193228-1-viro@zeniv.linux.org.uk


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f8f25893
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
	}