Skip to content

Commit

Permalink
ubifs: Convert xattr inum to host order
Browse files Browse the repository at this point in the history
UBIFS stores inode numbers as LE64 integers.
We have to convert them to host oder, otherwise
BE hosts won't be able to use the integer correctly.

Reported-by: kbuild test robot <lkp@intel.com>
Fixes: 9ca2d73 ("ubifs: Limit number of xattrs per inode")
Signed-off-by: Richard Weinberger <richard@nod.at>
  • Loading branch information
Richard Weinberger committed May 15, 2019
1 parent 76aa349 commit 4dd0481
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/ubifs/xattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ int ubifs_purge_xattrs(struct inode *host)
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",
Expand Down

0 comments on commit 4dd0481

Please sign in to comment.