ocfs2/trivial: Use le16_to_cpu for a disk value in xattr.c
[sfrench/cifs-2.6.git] / fs / ocfs2 / xattr.c
index fe3419068df2efa5ed33ff7cdc424327d04431f0..932c0773160861e905ff6269aff50de36384d76b 100644 (file)
@@ -98,10 +98,8 @@ static struct ocfs2_xattr_def_value_root def_xv = {
 
 struct xattr_handler *ocfs2_xattr_handlers[] = {
        &ocfs2_xattr_user_handler,
-#ifdef CONFIG_OCFS2_FS_POSIX_ACL
        &ocfs2_xattr_acl_access_handler,
        &ocfs2_xattr_acl_default_handler,
-#endif
        &ocfs2_xattr_trusted_handler,
        &ocfs2_xattr_security_handler,
        NULL
@@ -109,12 +107,10 @@ struct xattr_handler *ocfs2_xattr_handlers[] = {
 
 static struct xattr_handler *ocfs2_xattr_handler_map[OCFS2_XATTR_MAX] = {
        [OCFS2_XATTR_INDEX_USER]        = &ocfs2_xattr_user_handler,
-#ifdef CONFIG_OCFS2_FS_POSIX_ACL
        [OCFS2_XATTR_INDEX_POSIX_ACL_ACCESS]
                                        = &ocfs2_xattr_acl_access_handler,
        [OCFS2_XATTR_INDEX_POSIX_ACL_DEFAULT]
                                        = &ocfs2_xattr_acl_default_handler,
-#endif
        [OCFS2_XATTR_INDEX_TRUSTED]     = &ocfs2_xattr_trusted_handler,
        [OCFS2_XATTR_INDEX_SECURITY]    = &ocfs2_xattr_security_handler,
 };
@@ -6066,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);