]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/gfs2/lops.c
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[karo-tx-linux.git] / fs / gfs2 / lops.c
index 852c1be1dd3be6ed8d8883182279db820943a2f7..8ff95a2d54ee7dae3de7a9ad6945b5a6c0f17b13 100644 (file)
@@ -401,9 +401,14 @@ static void buf_lo_add(struct gfs2_sbd *sdp, struct gfs2_bufdata *bd)
                goto out;
        set_bit(GLF_LFLUSH, &bd->bd_gl->gl_flags);
        set_bit(GLF_DIRTY, &bd->bd_gl->gl_flags);
-       gfs2_meta_check(sdp, bd->bd_bh);
-       gfs2_pin(sdp, bd->bd_bh);
        mh = (struct gfs2_meta_header *)bd->bd_bh->b_data;
+       if (unlikely(mh->mh_magic != cpu_to_be32(GFS2_MAGIC))) {
+               printk(KERN_ERR
+                      "Attempting to add uninitialised block to journal (inplace block=%lld)\n",
+                      (unsigned long long)bd->bd_bh->b_blocknr);
+               BUG();
+       }
+       gfs2_pin(sdp, bd->bd_bh);
        mh->__pad0 = cpu_to_be64(0);
        mh->mh_jid = cpu_to_be32(sdp->sd_jdesc->jd_jid);
        sdp->sd_log_num_buf++;