diff --git a/fs/debugfs/file.c b/fs/debugfs/file.c index e33cc77699cd..5fbefce2b372 100644 --- a/fs/debugfs/file.c +++ b/fs/debugfs/file.c @@ -102,6 +102,7 @@ static int __debugfs_file_get(struct dentry *dentry, enum dbgfs_get_mode mode) if (!fsd) return -ENOMEM; + fsd->methods = 0; if (mode == DBGFS_GET_SHORT) { const struct debugfs_short_fops *ops; ops = fsd->short_fops = DEBUGFS_I(inode)->short_fops;