]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/gfs2/ondisk.c
Merge branch 'upstream-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/linvil...
[linux-2.6-omap-h63xx.git] / fs / gfs2 / ondisk.c
index 82003e872a3708ca43c223bd655ae3fac5e87e3c..d9ecfd23a49e339e1b74bdc0dc5aab9f3f38fcfb 100644 (file)
@@ -7,7 +7,6 @@
  * of the GNU General Public License version 2.
  */
 
-#include <linux/sched.h>
 #include <linux/slab.h>
 #include <linux/spinlock.h>
 #include <linux/completion.h>
@@ -65,15 +64,6 @@ static void gfs2_meta_header_in(struct gfs2_meta_header_host *mh, const void *bu
        mh->mh_format = be32_to_cpu(str->mh_format);
 }
 
-static void gfs2_meta_header_out(const struct gfs2_meta_header_host *mh, void *buf)
-{
-       struct gfs2_meta_header *str = buf;
-
-       str->mh_magic = cpu_to_be32(mh->mh_magic);
-       str->mh_type = cpu_to_be32(mh->mh_type);
-       str->mh_format = cpu_to_be32(mh->mh_format);
-}
-
 void gfs2_sb_in(struct gfs2_sb_host *sb, const void *buf)
 {
        const struct gfs2_sb *str = buf;
@@ -119,7 +109,6 @@ void gfs2_rgrp_in(struct gfs2_rgrp_host *rg, const void *buf)
 {
        const struct gfs2_rgrp *str = buf;
 
-       gfs2_meta_header_in(&rg->rg_header, buf);
        rg->rg_flags = be32_to_cpu(str->rg_flags);
        rg->rg_free = be32_to_cpu(str->rg_free);
        rg->rg_dinodes = be32_to_cpu(str->rg_dinodes);
@@ -130,7 +119,6 @@ void gfs2_rgrp_out(const struct gfs2_rgrp_host *rg, void *buf)
 {
        struct gfs2_rgrp *str = buf;
 
-       gfs2_meta_header_out(&rg->rg_header, buf);
        str->rg_flags = cpu_to_be32(rg->rg_flags);
        str->rg_free = cpu_to_be32(rg->rg_free);
        str->rg_dinodes = cpu_to_be32(rg->rg_dinodes);
@@ -176,9 +164,10 @@ void gfs2_dinode_out(const struct gfs2_inode *ip, void *buf)
        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);
 
@@ -197,7 +186,6 @@ void gfs2_dinode_print(const struct gfs2_inode *ip)
        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");