]> www.infradead.org Git - users/jedix/linux-maple.git/commit
f2fs: fix to do cast in F2FS_{BLK_TO_BYTES, BTYES_TO_BLK} to avoid overflow
authorChao Yu <chao@kernel.org>
Fri, 8 Nov 2024 01:25:54 +0000 (09:25 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Thu, 21 Nov 2024 16:12:29 +0000 (16:12 +0000)
commit3273d8ad947dea925a65a78ca29e5351c960c801
treefea41d665296c1728c422485639e8e8bfbd32a7b
parent789ca0eb47f7782b3230ab0957eabd7967b78cae
f2fs: fix to do cast in F2FS_{BLK_TO_BYTES, BTYES_TO_BLK} to avoid overflow

It missed to cast variable to unsigned long long type before
bit shift, which will cause overflow, fix it.

Fixes: f7ef9b83b583 ("f2fs: introduce macros to convert bytes and blocks in f2fs")
Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/super.c
include/linux/f2fs_fs.h