Update ext2fs interface usage for group descriptor

The current e2fsprogs-libs changes the group descriptor access method,
requiring an additional function call now.

BUG=chromium-os:22172
TEST=lumpy64 build & boot
CQ-DEPEND=I70114b582b46c26b69ab822b8c33b32f03ef9db0

Change-Id: I98c6bab1a7f7af8a7c351ce04cebf07813c3a1ab
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/15994
diff --git a/metadata.cc b/metadata.cc
index 6b52f29..bc7222b 100644
--- a/metadata.cc
+++ b/metadata.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
@@ -212,7 +212,9 @@
   // The metadata blocks are at the start of each block group and goes
   // until the end of the inode table.
   for (dgrp_t bg = 0; bg < fs_old->group_desc_count; bg++) {
-    struct ext2_group_desc* group_desc = &fs_old->group_desc[bg];
+    struct ext2_group_desc* group_desc = ext2fs_group_desc(fs_old,
+                                                           fs_old->group_desc,
+                                                           bg);
     __u32 num_metadata_blocks = (group_desc->bg_inode_table +
                                  fs_old->inode_blocks_per_group) -
                                  (bg * fs_old->super->s_blocks_per_group);