From: Tao Ma Date: Wed, 23 Dec 2009 06:31:15 +0000 (+0800) Subject: ocfs2/trivial: Use le16_to_cpu for a disk value in xattr.c X-Git-Tag: accepted/tizen/common/20141203.182822~13157^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8ff6af881deccca4f88e03f2fdadb1aac42e9489;p=platform%2Fkernel%2Flinux-arm64.git ocfs2/trivial: Use le16_to_cpu for a disk value in xattr.c In ocfs2_value_metas_in_xattr_header, we should Use le16_to_cpu for ocfs2_extent_list.l_next_free_rec. Signed-off-by: Tao Ma Signed-off-by: Joel Becker --- diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c index 923e950e..932c077 100644 --- a/fs/ocfs2/xattr.c +++ b/fs/ocfs2/xattr.c @@ -6062,7 +6062,7 @@ static int ocfs2_value_metas_in_xattr_header(struct super_block *sb, * to the extent block, so just calculate a maximum record num. */ if (!xv->xr_list.l_tree_depth) - *num_recs += xv->xr_list.l_next_free_rec; + *num_recs += le16_to_cpu(xv->xr_list.l_next_free_rec); else *num_recs += ocfs2_clusters_for_bytes(sb, XATTR_SIZE_MAX);