aboutsummaryrefslogtreecommitdiff
path: root/fs/f2fs/node.c
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2016-10-11 10:36:12 -0700
committerMister Oyster <oysterized@gmail.com>2017-04-13 12:34:17 +0200
commit3ab99cc83ad85772102d7dc233d6ccc3301ff1fa (patch)
tree4d706852f58f4e723aa710057f0f50dbfce67c21 /fs/f2fs/node.c
parent90ee2d4b79ec3419fb621cae2d4f00268809fb05 (diff)
f2fs: fix sparse warnings
f2fs contained a number of endianness conversion bugs. Also, one function should have been 'static'. Found with sparse by running 'make C=2 CF=-D__CHECK_ENDIAN__ fs/f2fs/' Signed-off-by: Eric Biggers <ebiggers@google.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/node.c')
-rw-r--r--fs/f2fs/node.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index 8f53e2a42..789843003 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -280,8 +280,9 @@ static void cache_nat_entry(struct f2fs_sb_info *sbi, nid_t nid,
e = grab_nat_entry(nm_i, nid);
node_info_from_raw_nat(&e->ni, ne);
} else {
- f2fs_bug_on(sbi, nat_get_ino(e) != ne->ino ||
- nat_get_blkaddr(e) != ne->block_addr ||
+ f2fs_bug_on(sbi, nat_get_ino(e) != le32_to_cpu(ne->ino) ||
+ nat_get_blkaddr(e) !=
+ le32_to_cpu(ne->block_addr) ||
nat_get_version(e) != ne->version);
}
}