]> git.baikalelectronics.ru Git - kernel.git/commit
f2fs: fix incorrect mapping in ->bmap
authorChao Yu <yuchao0@huawei.com>
Thu, 5 May 2016 11:13:02 +0000 (19:13 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Sat, 7 May 2016 17:32:32 +0000 (10:32 -0700)
commitd25d282e2a3a8bbc24015ba0892eb02a7fac857a
treeb006060f4d1b8f34616b949c9dc4f278b39015cd
parent8d28012beab1e3ce0c4d72f196eb4cefcb4fb668
f2fs: fix incorrect mapping in ->bmap

Currently, generic_block_bmap is used in f2fs_bmap, its semantics is when
the mapping is been found, return position of target physical block,
otherwise return zero.

But, previously, when there is no mapping info for specified logical block,
f2fs_bmap will map target physical block to a uninitialized variable, which
should be wrong. Fix it.

Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/data.c