]> www.infradead.org Git - users/willy/xarray.git/commit
ext4: move checksum length calculation of inode bitmap into ext4_inode_bitmap_csum_...
authorKemeng Shi <shikemeng@huaweicloud.com>
Tue, 20 Aug 2024 13:22:32 +0000 (21:22 +0800)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 4 Sep 2024 02:12:15 +0000 (22:12 -0400)
commit66eafbde7d74e36cd80e6b6246ea4bd599416e2c
treee35ff384e4daf692b2190cd5c060c5cf5f480199
parentf7c69be505a5ec3df13b65cedb245343b2a5f751
ext4: move checksum length calculation of inode bitmap into ext4_inode_bitmap_csum_[verify/set]() functions

There are some little improve:
1. remove repeat code to calculate checksum length of inode bitmap
2. remove unnecessary checksum length calculation if checksum is not
enabled.
3. use more efficient bit shift operation instead of div opreation.

Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
Link: https://patch.msgid.link/20240820132234.2759926-6-shikemeng@huaweicloud.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/bitmap.c
fs/ext4/ext4.h
fs/ext4/ialloc.c
fs/ext4/resize.c