ocfs2/trivial: Use le16_to_cpu for a disk value in xattr.c
[sfrench/cifs-2.6.git] / fs / ocfs2 / xattr.c
index 923e950e544523ed3c4c57a9b9a67c2df82baaa9..932c0773160861e905ff6269aff50de36384d76b 100644 (file)
@@ -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);