dip->i_di.di_size = sdp->sd_sb.sb_bsize / 2;
        dip->i_di.di_blocks++;
        dip->i_di.di_flags |= GFS2_DIF_EXHASH;
-       dip->i_di.di_payload_format = 0;
 
        for (x = sdp->sd_hash_ptrs, y = -1; x; x >>= 1, y++) ;
        dip->i_di.di_depth = y;
 
        di->di_generation = be64_to_cpu(str->di_generation);
 
        di->di_flags = be32_to_cpu(str->di_flags);
-       di->di_payload_format = be32_to_cpu(str->di_payload_format);
        di->di_height = be16_to_cpu(str->di_height);
 
        di->di_depth = be16_to_cpu(str->di_depth);
        }
 
        di->__pad1 = 0;
-       di->di_payload_format = cpu_to_be32(0);
+       di->di_payload_format = cpu_to_be32(S_ISDIR(mode) ? GFS2_FORMAT_DE : 0);
        di->di_height = cpu_to_be32(0);
        di->__pad2 = 0;
        di->__pad3 = 0;
 
        str->di_generation = cpu_to_be64(di->di_generation);
 
        str->di_flags = cpu_to_be32(di->di_flags);
-       str->di_payload_format = cpu_to_be32(di->di_payload_format);
        str->di_height = cpu_to_be16(di->di_height);
-
+       str->di_payload_format = cpu_to_be32(S_ISDIR(ip->i_inode.i_mode) &&
+                                            !(ip->i_di.di_flags & GFS2_DIF_EXHASH) ?
+                                            GFS2_FORMAT_DE : 0);
        str->di_depth = cpu_to_be16(di->di_depth);
        str->di_entries = cpu_to_be32(di->di_entries);
 
        printk(KERN_INFO "  di_goal_data = %llu\n", (unsigned long long)di->di_goal_data);
 
        pv(di, di_flags, "0x%.8X");
-       pv(di, di_payload_format, "%u");
        pv(di, di_height, "%u");
 
        pv(di, di_depth, "%u");
 
        ip->i_inode.i_nlink = 2;
        ip->i_di.di_size = sdp->sd_sb.sb_bsize - sizeof(struct gfs2_dinode);
        ip->i_di.di_flags |= GFS2_DIF_JDATA;
-       ip->i_di.di_payload_format = GFS2_FORMAT_DE;
        ip->i_di.di_entries = 2;
 
        error = gfs2_meta_inode_buffer(ip, &dibh);
 
        __u64 di_generation;    /* generation number for NFS */
 
        __u32 di_flags; /* GFS2_DIF_... */
-       __u32 di_payload_format;  /* GFS2_FORMAT_... */
        __u16 di_height;        /* height of metadata */
 
        /* These only apply to directories  */