]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
f2fs: compress: fix to avoid redundant compress extension
authorChao Yu <chao@kernel.org>
Mon, 28 Aug 2023 14:04:17 +0000 (22:04 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Nov 2023 10:08:25 +0000 (11:08 +0100)
commite9f598a5cc9a36d3c531509b206ff92e3e2f7f17
tree957142730983236e25a114cd5d5bce3dbc5881e2
parent8c4504cc0c64862740a6acb301e0cfa59580dbc5
f2fs: compress: fix to avoid redundant compress extension

[ Upstream commit 7e1b150fece033703a824df1bbc03df091ea53cc ]

With below script, redundant compress extension will be parsed and added
by parse_options(), because parse_options() doesn't check whether the
extension is existed or not, fix it.

1. mount -t f2fs -o compress_extension=so /dev/vdb /mnt/f2fs
2. mount -t f2fs -o remount,compress_extension=so /mnt/f2fs
3. mount|grep f2fs

/dev/vdb on /mnt/f2fs type f2fs (...,compress_extension=so,compress_extension=so,...)

Fixes: 4c8ff7095bef ("f2fs: support data compression")
Fixes: 151b1982be5d ("f2fs: compress: add nocompress extensions support")
Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/f2fs/super.c