diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2014-09-25 13:39:17 +0200 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2014-10-01 00:34:56 +0200 |
commit | 8a21984d5d86540ba32b4b346d8fe6426018b7a7 (patch) | |
tree | f74aef0bfae8cd51e3efea3d2c003ab84a71699b /fs/f2fs | |
parent | f2fs: call f2fs_unlock_op after error was handled (diff) | |
download | linux-8a21984d5d86540ba32b4b346d8fe6426018b7a7.tar.xz linux-8a21984d5d86540ba32b4b346d8fe6426018b7a7.zip |
f2fs: potential shift wrapping buf in f2fs_trim_fs()
My static checker complains that segment is a u64 but only the lower 31
bits can be used before we hit a shift wrapping bug.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r-- | fs/f2fs/segment.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/segment.h b/fs/f2fs/segment.h index a7e3e9112100..afb73627a8ec 100644 --- a/fs/f2fs/segment.h +++ b/fs/f2fs/segment.h @@ -55,7 +55,7 @@ #define TOTAL_BLKS(sbi) (TOTAL_SEGS(sbi) << sbi->log_blocks_per_seg) #define MAX_BLKADDR(sbi) (SEG0_BLKADDR(sbi) + TOTAL_BLKS(sbi)) -#define SEGMENT_SIZE(sbi) (1 << (sbi->log_blocksize + \ +#define SEGMENT_SIZE(sbi) (1ULL << (sbi->log_blocksize + \ sbi->log_blocks_per_seg)) #define START_BLOCK(sbi, segno) (SEG0_BLKADDR(sbi) + \ |