]> git.karo-electronics.de Git - linux-beck.git/commit
f2fs: bug fix on bit overflow from 32bits to 64bits
authorJaegeuk Kim <jaegeuk.kim@samsung.com>
Thu, 28 Nov 2013 03:44:05 +0000 (12:44 +0900)
committerJaegeuk Kim <jaegeuk.kim@samsung.com>
Mon, 23 Dec 2013 01:18:04 +0000 (10:18 +0900)
commitf9a4e6df52edf8ce1040d1b8d340d31234a1bce3
tree582de93c164bba60633884bc3834d546da5cb529
parent36795567942a033ef9e22d8eba86396ffb9aa80c
f2fs: bug fix on bit overflow from 32bits to 64bits

This patch fixes some bit overflows by the shift operations.

Dan Carpenter reported potential bugs on bit overflows as follows.

fs/f2fs/segment.c:910 submit_write_page()
warn: should 'blk_addr << ((sbi)->log_blocksize - 9)' be a 64 bit type?
fs/f2fs/checkpoint.c:429 get_valid_checkpoint()
warn: should '1 << ()' be a 64 bit type?
fs/f2fs/data.c:408 f2fs_readpage()
warn: should 'blk_addr << ((sbi)->log_blocksize - 9)' be a 64 bit type?
fs/f2fs/data.c:457 submit_read_page()
warn: should 'blk_addr << ((sbi)->log_blocksize - 9)' be a 64 bit type?
fs/f2fs/data.c:525 get_data_block_ro()
warn: should 'i << blkbits' be a 64 bit type?

Bug-Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
fs/f2fs/checkpoint.c
fs/f2fs/data.c
fs/f2fs/segment.c
fs/f2fs/segment.h