]> git.baikalelectronics.ru Git - kernel.git/commit
fs: reiserfs: remove useless new_opts in reiserfs_remount
authorDongliang Mu <mudongliangabcd@gmail.com>
Wed, 27 Oct 2021 14:34:41 +0000 (22:34 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Feb 2023 06:52:43 +0000 (07:52 +0100)
commit436d97a8994be9e97df4ade4d6bdb92a90ab707d
tree784e7660c3aa35908dd11770354215ba8a9a5b34
parentcf303d8ab500e0ce1eebf1e3468e3d687d04838a
fs: reiserfs: remove useless new_opts in reiserfs_remount

commit dc8a8d010be23cc4635b41da30be4171cb85f747 upstream.

Since the commit 6130f167d73b ("VFS: Don't use save/replace_mount_options
if not using generic_show_options") eliminates replace_mount_options
in reiserfs_remount, but does not handle the allocated new_opts,
it will cause memory leak in the reiserfs_remount.

Because new_opts is useless in reiserfs_mount, so we fix this bug by
removing the useless new_opts in reiserfs_remount.

Fixes: 6130f167d73b ("VFS: Don't use save/replace_mount_options if not using generic_show_options")
Link: https://lore.kernel.org/r/20211027143445.4156459-1-mudongliangabcd@gmail.com
Signed-off-by: Dongliang Mu <mudongliangabcd@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Fedor Pchelkin <pchelkin@ispras.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/reiserfs/super.c