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/compress.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/compress.c')
-rw-r--r-- | fs/f2fs/compress.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c index b40dec3d7f79..93fec1d37899 100644 --- a/fs/f2fs/compress.c +++ b/fs/f2fs/compress.c @@ -670,7 +670,7 @@ static int f2fs_compress_pages(struct compress_ctx *cc) cc->cbuf->clen = cpu_to_le32(cc->clen); - if (fi->i_compress_flag & 1 << COMPRESS_CHKSUM) + if (fi->i_compress_flag & BIT(COMPRESS_CHKSUM)) chksum = f2fs_crc32(F2FS_I_SB(cc->inode), cc->cbuf->cdata, cc->clen); cc->cbuf->chksum = cpu_to_le32(chksum); @@ -761,7 +761,7 @@ void f2fs_decompress_cluster(struct decompress_io_ctx *dic, bool in_task) ret = cops->decompress_pages(dic); - if (!ret && (fi->i_compress_flag & 1 << COMPRESS_CHKSUM)) { + if (!ret && (fi->i_compress_flag & BIT(COMPRESS_CHKSUM))) { u32 provided = le32_to_cpu(dic->cbuf->chksum); u32 calculated = f2fs_crc32(sbi, dic->cbuf->cdata, dic->clen); |