]> git.baikalelectronics.ru Git - kernel.git/commit
ubifs: Fixed missed le64_to_cpu() in journal
authorBen Dooks (Codethink) <ben.dooks@codethink.co.uk>
Wed, 16 Oct 2019 10:08:03 +0000 (11:08 +0100)
committerRichard Weinberger <richard@nod.at>
Sun, 17 Nov 2019 21:21:51 +0000 (22:21 +0100)
commitaba273e80c26e28c2766d583d68e4ba696e400b0
tree7378ce63d672612010d48808d08802304f32b5ec
parenta0ea3686aea3575ad1295a0dae68017f4353c627
ubifs: Fixed missed le64_to_cpu() in journal

In the ubifs_jnl_write_inode() functon, it calls ubifs_iget()
with xent->inum. The xent->inum is __le64, but the ubifs_iget()
takes native cpu endian.

I think that this should be changed to passing le64_to_cpu(xent->inum)
to fix the following sparse warning:

fs/ubifs/journal.c:902:58: warning: incorrect type in argument 2 (different base types)
fs/ubifs/journal.c:902:58:    expected unsigned long inum
fs/ubifs/journal.c:902:58:    got restricted __le64 [usertype] inum

Fixes: 2e38a1029f59 ("ubifs: journal: Handle xattrs like files")
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Signed-off-by: Richard Weinberger <richard@nod.at>
fs/ubifs/journal.c