summaryrefslogtreecommitdiff
path: root/fs/f2fs
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk.kim@samsung.com>2013-06-24 07:47:23 +0900
committerJaegeuk Kim <jaegeuk.kim@samsung.com>2013-07-02 08:48:13 +0900
commit060dd67b3c0d451ea2c41e6a87811b4736a984e4 (patch)
treebf211a3fab8c62589a4439fbbd26afa1009ca930 /fs/f2fs
parent7e586fa0244578320fcced9cc08c6b124f727c35 (diff)
downloadlinux-stable-060dd67b3c0d451ea2c41e6a87811b4736a984e4.tar.gz
linux-stable-060dd67b3c0d451ea2c41e6a87811b4736a984e4.tar.bz2
linux-stable-060dd67b3c0d451ea2c41e6a87811b4736a984e4.zip
f2fs: fix an endian conversion bug detected by sparse
This patch should fix the following bug reported by kbuild test robot. fs/f2fs/recovery.c:233:33: sparse: incorrect type in assignment (different base types) parse warnings: (new ones prefixed by >>) >> recovery.c:233: sparse: incorrect type in assignment (different base types) recovery.c:233: expected unsigned int [unsigned] [assigned] ofs_in_node recovery.c:233: got restricted __le16 [assigned] [usertype] ofs_in_node >> recovery.c:238: sparse: incorrect type in assignment (different base types) recovery.c:238: expected unsigned int [unsigned] ofs_in_node recovery.c:238: got restricted __le16 [assigned] [usertype] ofs_in_node Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/f2fs')
-rw-r--r--fs/f2fs/recovery.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/f2fs/recovery.c b/fs/f2fs/recovery.c
index ddde14f0eacb..9db8239642f4 100644
--- a/fs/f2fs/recovery.c
+++ b/fs/f2fs/recovery.c
@@ -246,12 +246,12 @@ static int check_index_in_prev_nodes(struct f2fs_sb_info *sbi,
struct dnode_of_data tdn = *dn;
tdn.nid = nid;
tdn.node_page = dn->inode_page;
- tdn.ofs_in_node = sum.ofs_in_node;
+ tdn.ofs_in_node = le16_to_cpu(sum.ofs_in_node);
truncate_data_blocks_range(&tdn, 1);
return 0;
} else if (dn->nid == nid) {
struct dnode_of_data tdn = *dn;
- tdn.ofs_in_node = sum.ofs_in_node;
+ tdn.ofs_in_node = le16_to_cpu(sum.ofs_in_node);
truncate_data_blocks_range(&tdn, 1);
return 0;
}