Skip to content
Commit 84a8d913 authored by Chao Yu's avatar Chao Yu Committed by Greg Kroah-Hartman
Browse files

f2fs: clean up i_compress_flag and i_compress_level usage

[ Upstream commit b90e5086 ]

.i_compress_level was introduced by commit 3fde13f8

 ("f2fs: compress:
support compress level"), but never be used.

This patch updates as below:
- load high 8-bits of on-disk .i_compress_flag to in-memory .i_compress_level
- load low 8-bits of on-disk .i_compress_flag to in-memory .i_compress_flag
- change type of in-memory .i_compress_flag from unsigned short to unsigned
char.

w/ above changes, we can avoid unneeded bit shift whenever during
.init_compress_ctx(), and shrink size of struct f2fs_inode_info.

Signed-off-by: default avatarChao Yu <chao@kernel.org>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
Stable-dep-of: f5f3bd90

 ("f2fs: set the default compress_level on ioctl")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 2c14f499
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment