summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Dooks (Codethink) <ben.dooks@codethink.co.uk>2019-10-16 11:08:03 +0100
committerRichard Weinberger <richard@nod.at>2019-11-17 22:21:51 +0100
commitdf22b5b3ecc6233e33bd27f67f14c0cd1b5a5897 (patch)
tree7378ce63d672612010d48808d08802304f32b5ec
parent3cfa4412df98207e07de6e60d3c805c541cbce1a (diff)
downloadlinux-df22b5b3ecc6233e33bd27f67f14c0cd1b5a5897.tar.gz
linux-df22b5b3ecc6233e33bd27f67f14c0cd1b5a5897.tar.bz2
linux-df22b5b3ecc6233e33bd27f67f14c0cd1b5a5897.zip
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: 7959cf3a7506 ("ubifs: journal: Handle xattrs like files") Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> Signed-off-by: Richard Weinberger <richard@nod.at>
-rw-r--r--fs/ubifs/journal.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ubifs/journal.c b/fs/ubifs/journal.c
index d6136f7c1cfc..388fe8f5dc51 100644
--- a/fs/ubifs/journal.c
+++ b/fs/ubifs/journal.c
@@ -899,7 +899,7 @@ int ubifs_jnl_write_inode(struct ubifs_info *c, const struct inode *inode)
fname_name(&nm) = xent->name;
fname_len(&nm) = le16_to_cpu(xent->nlen);
- xino = ubifs_iget(c->vfs_sb, xent->inum);
+ xino = ubifs_iget(c->vfs_sb, le64_to_cpu(xent->inum));
if (IS_ERR(xino)) {
err = PTR_ERR(xino);
ubifs_err(c, "dead directory entry '%s', error %d",