extern int ext4_mmp_csum_verify(struct super_block *sb,
                                struct mmp_struct *mmp);
 
-/* BH_Uninit flag: blocks are allocated but uninitialized on disk */
+/*
+ * Note that these flags will never ever appear in a buffer_head's state flag.
+ * See EXT4_MAP_... to see where this is used.
+ */
 enum ext4_state_bits {
        BH_Uninit       /* blocks are allocated but uninitialized on disk */
-         = BH_JBDPrivateStart,
+        = BH_JBDPrivateStart,
        BH_AllocFromCluster,    /* allocated blocks were part of already
-                                * allocated cluster. Note that this flag will
-                                * never, ever appear in a buffer_head's state
-                                * flag. See EXT4_MAP_FROM_CLUSTER to see where
-                                * this is used. */
+                                * allocated cluster. */
 };
 
-BUFFER_FNS(Uninit, uninit)
-TAS_BUFFER_FNS(Uninit, uninit)
-
 /*
  * Add new method to test whether block and inode bitmaps are properly
  * initialized. With uninit_bg reading the block from disk is not enough
 
                                        clear_buffer_delay(bh);
                                        bh->b_blocknr = pblock++;
                                }
-                               if (mpd->map.m_flags & EXT4_MAP_UNINIT)
-                                       set_buffer_uninit(bh);
                                clear_buffer_unwritten(bh);
                        } while (++lblk < blocks &&
                                 (bh = bh->b_this_page) != head);
        err = ext4_map_blocks(handle, inode, map, get_blocks_flags);
        if (err < 0)
                return err;
+       if (map->m_flags & EXT4_MAP_UNINIT)
+               ext4_set_io_unwritten_flag(inode, mpd->io_submit.io_end);
 
        BUG_ON(map->m_len == 0);
        if (map->m_flags & EXT4_MAP_NEW) {
 
                            struct inode *inode,
                            struct buffer_head *bh)
 {
-       ext4_io_end_t *io_end;
        int ret;
 
        if (io->io_bio && bh->b_blocknr != io->io_next_block) {
        ret = bio_add_page(io->io_bio, bh->b_page, bh->b_size, bh_offset(bh));
        if (ret != bh->b_size)
                goto submit_and_retry;
-       io_end = io->io_end;
-       if (test_clear_buffer_uninit(bh))
-               ext4_set_io_unwritten_flag(inode, io_end);
        io->io_next_block++;
        return 0;
 }