diff options
author | Yangtao Li <frank.li@vivo.com> | 2023-02-16 21:53:24 +0800 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2023-03-29 15:17:37 -0700 |
commit | 447286ebadaafa551550704ff0b42eb08b1d1cb2 (patch) | |
tree | 54cc1edc083d17a0ce9fa43fd5a07623caf4c41b /fs/f2fs/inode.c | |
parent | 960fa2c828a0af7a3b03b295e6aa17b2afeb5e07 (diff) |
f2fs: convert to use bitmap API
Let's use BIT() and GENMASK() instead of open it.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/inode.c')
-rw-r--r-- | fs/f2fs/inode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c index 7d2e2c0dba65..bb5b365a195d 100644 --- a/fs/f2fs/inode.c +++ b/fs/f2fs/inode.c @@ -454,8 +454,8 @@ static int do_read_inode(struct inode *inode) fi->i_compress_level = compress_flag >> COMPRESS_LEVEL_OFFSET; fi->i_compress_flag = compress_flag & - (BIT(COMPRESS_LEVEL_OFFSET) - 1); - fi->i_cluster_size = 1 << fi->i_log_cluster_size; + GENMASK(COMPRESS_LEVEL_OFFSET - 1, 0); + fi->i_cluster_size = BIT(fi->i_log_cluster_size); set_inode_flag(inode, FI_COMPRESSED_FILE); } } |