fs/ntfs3/super.c | 1 - 1 file changed, 1 deletion(-)
ntfs_fill_super() assigns fc->fs_private to a newly allocated options
structure earlier in the mount path. At the end of a successful mount, the
code set fc->fs_private = NULL, which prevented the vfs from freeing this
memory during mount context cleanup. As a result, the options structure
was leaked.
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
---
fs/ntfs3/super.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/fs/ntfs3/super.c b/fs/ntfs3/super.c
index a641d474c782..38d82e46171a 100644
--- a/fs/ntfs3/super.c
+++ b/fs/ntfs3/super.c
@@ -1252,7 +1252,6 @@ static int ntfs_fill_super(struct super_block *sb, struct fs_context *fc)
}
}
sbi->options = options;
- fc->fs_private = NULL;
sb->s_flags |= SB_NODIRATIME;
sb->s_magic = 0x7366746e; // "ntfs"
sb->s_op = &ntfs_sops;
--
2.43.0
On 12/11/25 14:51, Konstantin Komarov wrote: > ntfs_fill_super() assigns fc->fs_private to a newly allocated options > structure earlier in the mount path. At the end of a successful mount, the > code set fc->fs_private = NULL, which prevented the vfs from freeing this > memory during mount context cleanup. As a result, the options structure > was leaked. > > Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com> > --- > fs/ntfs3/super.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/fs/ntfs3/super.c b/fs/ntfs3/super.c > index a641d474c782..38d82e46171a 100644 > --- a/fs/ntfs3/super.c > +++ b/fs/ntfs3/super.c > @@ -1252,7 +1252,6 @@ static int ntfs_fill_super(struct super_block *sb, struct fs_context *fc) > } > } > sbi->options = options; > - fc->fs_private = NULL; > sb->s_flags |= SB_NODIRATIME; > sb->s_magic = 0x7366746e; // "ntfs" > sb->s_op = &ntfs_sops; Please withdraw this patch. I realized after sending it that an equivalent patch was already submitted earlier by Baokun Li<libaokun1@huawei.com>. My version is redundant, so I will drop it and proceed with reviewing/merging the earlier contribution. Apologies for the duplication. Regards, Konstantin
© 2016 - 2026 Red Hat, Inc.