diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c index 05d1a9c4fb7647181c744d5580183eec5b9587c2..d6c5fb53c746cc79a8aedbc47cab7e6fe9ada364 100644 --- a/fs/debugfs/inode.c +++ b/fs/debugfs/inode.c @@ -206,13 +206,15 @@ struct dentry *debugfs_create_file(const char *name, mode_t mode, pr_debug("debugfs: creating file '%s'\n",name); - error = simple_pin_fs(&debug_fs_type, &debugfs_mount, &debugfs_mount_count); + error = simple_pin_fs(&debug_fs_type, &debugfs_mount, + &debugfs_mount_count); if (error) goto exit; error = debugfs_create_by_name(name, mode, parent, &dentry); if (error) { dentry = NULL; + simple_release_fs(&debugfs_mount, &debugfs_mount_count); goto exit; }