summaryrefslogtreecommitdiffstats
path: root/fs/ocfs2
diff options
context:
space:
mode:
authorTao Ma <tao.ma@oracle.com>2009-12-23 07:31:15 +0100
committerJoel Becker <joel.becker@oracle.com>2009-12-24 02:52:16 +0100
commit8ff6af881deccca4f88e03f2fdadb1aac42e9489 (patch)
treec380885c09aacadc96ab3fad0e607f2fa324dc97 /fs/ocfs2
parentocfs2/trivial: Use proper mask for 2 places in hearbeat.c (diff)
downloadlinux-8ff6af881deccca4f88e03f2fdadb1aac42e9489.tar.xz
linux-8ff6af881deccca4f88e03f2fdadb1aac42e9489.zip
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 <tao.ma@oracle.com> Signed-off-by: Joel Becker <joel.becker@oracle.com>
Diffstat (limited to 'fs/ocfs2')
-rw-r--r--fs/ocfs2/xattr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c
index 923e950e5445..932c07731608 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);