summaryrefslogtreecommitdiffstats
path: root/fs/f2fs
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2014-09-25 14:39:17 +0300
committerJaegeuk Kim <jaegeuk@kernel.org>2014-09-30 15:34:56 -0700
commit8a21984d5d86540ba32b4b346d8fe6426018b7a7 (patch)
treef74aef0bfae8cd51e3efea3d2c003ab84a71699b /fs/f2fs
parent44c16156512f33c81e382a1e1df9524e26a7026a (diff)
downloadlinux-stable-8a21984d5d86540ba32b4b346d8fe6426018b7a7.tar.gz
linux-stable-8a21984d5d86540ba32b4b346d8fe6426018b7a7.tar.bz2
linux-stable-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.h2
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) + \